tx · 87QmdqLcghUMUbzexuh2NM794s2nrN2eN6WKNCCtw12i

3Mx1vNMiWzJ2NgY1t8bqsj8vvpxjaTLJWyo:  -0.01400000 Waves

2021.10.07 11:22 [1735563] smart account 3Mx1vNMiWzJ2NgY1t8bqsj8vvpxjaTLJWyo > SELF 0.00000000 Waves

{ "type": 13, "id": "87QmdqLcghUMUbzexuh2NM794s2nrN2eN6WKNCCtw12i", "fee": 1400000, "feeAssetId": null, "timestamp": 1633594926254, "version": 2, "chainId": 84, "sender": "3Mx1vNMiWzJ2NgY1t8bqsj8vvpxjaTLJWyo", "senderPublicKey": "5fUyPtPgB9o1mWXPYifKATuZc8PG2ErT5CGABbC7pu3", "proofs": [ "4JGLPQXj78xYx6aaZBkFEFJ1GTmzctFC8iRZCtUYQNN1naYoG4id3om2aQNaGCr3GG134LTspL5sq5oiSnmLG1Ud" ], "script": "base64:AAIFAAAAAAAAAAcIAhIDCgEIAAAACAAAAAAJbWF4U3VwcGx5AAAAAAAAAAPoAAAAAAV3YXZlcwAAAAAABfXhAAEAAAAMZ2V0UHVua0lES2V5AAAAAQAAAAJpZAkAASwAAAACAgAAAAVwdW5rXwUAAAACaWQBAAAADXRyeUdldEludGVnZXIAAAABAAAAA2tleQQAAAADdmFsBAAAAAckbWF0Y2gwCQAEGgAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAADSW50BAAAAAFiBQAAAAckbWF0Y2gwBQAAAAFiAAAAAAAAAAAABQAAAAN2YWwBAAAADHRyeUdldFN0cmluZwAAAAEAAAADa2V5BAAAAAN2YWwEAAAAByRtYXRjaDAJAAQdAAAAAgUAAAAEdGhpcwUAAAADa2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAAZTdHJpbmcEAAAAAWIFAAAAByRtYXRjaDAFAAAAAWICAAAAAAUAAAADdmFsAQAAAA10cnlHZXRBZGRyZXNzAAAAAQAAAARhZGRyBAAAAAN2YWwEAAAAByRtYXRj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aWZ5AAAAAAkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXnvV0Dy", "height": 1735563, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: Dyr5GBcCravRzvjcGrtJX4gPR5wznhPvHEZKgmYv9jNQ Next: GiHAFUyWrVDoyWvjGMZvdPJNZxbBbEQtfsZmHw7XgF3s Diff:
OldNewDifferences
4747 else if ($isInstanceOf(h, "Unit"))
4848 then {
4949 let m = h
50- this
50+ Address(base58'3Msrw9Kxa6RgHYQ63sSib9uESmaBU9gH6Gy')
5151 }
5252 else throw("Match error")
5353 }
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = 1000
55
66 let b = 100000000
77
88 func c (d) = ("punk_" + d)
99
1010
1111 func e (f) = {
1212 let g = {
1313 let h = getInteger(this, f)
1414 if ($isInstanceOf(h, "Int"))
1515 then {
1616 let i = h
1717 i
1818 }
1919 else 0
2020 }
2121 g
2222 }
2323
2424
2525 func j (f) = {
2626 let g = {
2727 let h = getString(this, f)
2828 if ($isInstanceOf(h, "String"))
2929 then {
3030 let i = h
3131 i
3232 }
3333 else ""
3434 }
3535 g
3636 }
3737
3838
3939 func k (l) = {
4040 let g = {
4141 let h = addressFromString(l)
4242 if ($isInstanceOf(h, "Address"))
4343 then {
4444 let m = h
4545 m
4646 }
4747 else if ($isInstanceOf(h, "Unit"))
4848 then {
4949 let m = h
50- this
50+ Address(base58'3Msrw9Kxa6RgHYQ63sSib9uESmaBU9gH6Gy')
5151 }
5252 else throw("Match error")
5353 }
5454 g
5555 }
5656
5757
5858 func n (o,p,q,r) = {
5959 let s = value(blockInfoByHeight((q - 1)))
6060 let t = sha256_16Kb((p + value(s.vrf)))
6161 (toInt(t, r) % o)
6262 }
6363
6464
6565 func u (v) = if ((v == 0))
6666 then b
6767 else (((v / 100) + 1) * b)
6868
6969
7070 @Callable(w)
7171 func mint (x) = {
7272 let v = e("punks_supply")
7373 let y = j("available_punks")
7474 let z = u(v)
7575 let A = value(w.payments[0])
7676 let B = {
7777 let h = A.assetId
7878 if ($isInstanceOf(h, "ByteVector"))
7979 then {
8080 let C = h
8181 true
8282 }
8383 else if ($isInstanceOf(h, "Unit"))
8484 then {
8585 let D = h
8686 false
8787 }
8888 else throw("Match error")
8989 }
9090 if ((v == a))
9191 then throw("All punks are minted")
9292 else if ((y == ""))
9393 then throw("No punks available")
9494 else if (B)
9595 then throw("Payment must be in Waves tokens only")
9696 else if ((z > A.amount))
9797 then throw("Insufficient funds")
9898 else {
9999 let E = split(y, ",")
100100 let F = n((a - v), w.transactionId, height, 0)
101101 let G = E[F]
102102 let H = ("WavesPunk #" + G)
103103 let I = Issue(H, H, 1, 0, false, unit, height)
104104 let J = calculateAssetId(I)
105105 let K = k(x)
106106 [IntegerEntry("punks_supply", (v + 1)), StringEntry("available_punks", makeString(removeByIndex(E, F), ",")), I, StringEntry(c(G), toBase58String(J)), StringEntry(toBase58String(J), c(G)), ScriptTransfer(w.caller, 1, J), ScriptTransfer(K, (A.amount / 10), unit)]
107107 }
108108 }
109109
110110
111111 @Verifier(L)
112112 func M () = sigVerify(L.bodyBytes, L.proofs[0], L.senderPublicKey)
113113

github/deemru/w8io/169f3d6 
47.36 ms