tx · 2V6JEWnj7NfZBPdBHPgTJNn2Tste5tL3YHPQbtMKT9Yk

3N37eLdtWjhS31FGHvu2HpGLreF11i58Bv6:  -0.01000000 Waves

2023.03.16 13:20 [2492453] smart account 3N37eLdtWjhS31FGHvu2HpGLreF11i58Bv6 > SELF 0.00000000 Waves

{ "type": 13, "id": "2V6JEWnj7NfZBPdBHPgTJNn2Tste5tL3YHPQbtMKT9Yk", "fee": 1000000, "feeAssetId": null, "timestamp": 1678962108309, "version": 2, "chainId": 84, "sender": "3N37eLdtWjhS31FGHvu2HpGLreF11i58Bv6", "senderPublicKey": "3pW4h7e3NAcqGkvc1AyziZLMPSsG2eXvCGU7vLxPXkaq", "proofs": [ "53TyvShpf8SRmGkpLQgChem9zKMGp2nKDHNXrxQaht1LSQ6V15DyMoNnY7u4LWZP3CChe693mVyikWMHCeuX6JHR" ], "script": "base64:AAIFAAAAAAAAAAkIAhIFCgMBAQEAAAAAAAAAAQAAAAFpAQAAAARjYWxsAAAAAwAAAAtmaXJzdE51bWJlcgAAAAxzZWNvbmROdW1iZXIAAAAIbXVsdGlwbHkEAAAADGJpZ0ludFJlc3VsdAkAAToAAAACCQABOQAAAAIJAAE2AAAAAQUAAAALZmlyc3ROdW1iZXIJAAE2AAAAAQUAAAAIbXVsdGlwbHkJAAE5AAAAAgkAATYAAAABBQAAAAxzZWNvbmROdW1iZXIJAAE2AAAAAQUAAAAIbXVsdGlwbHkEAAAABnJlc3VsdAkAAaAAAAABBQAAAAxiaWdJbnRSZXN1bHQJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAICAAAABnJlc3VsdAUAAAAGcmVzdWx0BQAAAANuaWwAAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAACQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleWGhMqE=", "height": 2492453, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 6N6y16P3DaaaxaUQKcCC5WxEpJvRqL2rkUPpfWodXKk Next: 9nZL2VYJXhhWKVCeQVo17YYD9HjGb5b52jSQHk9Lk73U Diff:
OldNewDifferences
1-{-# STDLIB_VERSION 6 #-}
1+{-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-let bstUsdtAssetStorageKey = "bstUsdtAssetId"
5-
6-let bstSurfAssetStorageKey = "bstSurfAssetId"
7-
8-func unwrap (data) = match data {
9- case v: ByteVector =>
10- v
11- case _ =>
12- throw("Expected that data will be string")
13-}
144
155
166 @Callable(i)
17-func issueAssets () = {
18- let bstUsdt = Issue("bstUsdtTest1", "", 10000000, 6, true, unit, 0)
19- let bstUsdtAssetId = calculateAssetId(bstUsdt)
20- let bstSurf = Issue("bstSurfTest1", "", 10000000, 6, true, unit, 1)
21- let bstSurfAssetId = calculateAssetId(bstSurf)
22-[DeleteEntry(bstUsdtAssetStorageKey), DeleteEntry(bstSurfAssetStorageKey), BinaryEntry(bstUsdtAssetStorageKey, bstUsdtAssetId), BinaryEntry(bstSurfAssetStorageKey, bstSurfAssetId), bstUsdt, bstSurf]
23- }
24-
25-
26-
27-@Callable(i)
28-func sendInternalAssetsToTheCaller (id,amount) = {
29- let assetId = if ((id == 0))
30- then unwrap(getBinary(bstUsdtAssetStorageKey))
31- else if ((id == 1))
32- then unwrap(getBinary(bstSurfAssetStorageKey))
33- else throw("Wrong Asset Id")
34- let balance = assetBalance(this, assetId)
35- if ((balance >= amount))
36- then [ScriptTransfer(i.caller, amount, assetId)]
37- else [Reissue(assetId, amount, true), ScriptTransfer(i.caller, amount, assetId)]
7+func call (firstNumber,secondNumber,multiply) = {
8+ let bigIntResult = ((toBigInt(firstNumber) * toBigInt(multiply)) / (toBigInt(secondNumber) * toBigInt(multiply)))
9+ let result = toInt(bigIntResult)
10+[IntegerEntry("result", result)]
3811 }
3912
4013
Full:
OldNewDifferences
1-{-# STDLIB_VERSION 6 #-}
1+{-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-let bstUsdtAssetStorageKey = "bstUsdtAssetId"
5-
6-let bstSurfAssetStorageKey = "bstSurfAssetId"
7-
8-func unwrap (data) = match data {
9- case v: ByteVector =>
10- v
11- case _ =>
12- throw("Expected that data will be string")
13-}
144
155
166 @Callable(i)
17-func issueAssets () = {
18- let bstUsdt = Issue("bstUsdtTest1", "", 10000000, 6, true, unit, 0)
19- let bstUsdtAssetId = calculateAssetId(bstUsdt)
20- let bstSurf = Issue("bstSurfTest1", "", 10000000, 6, true, unit, 1)
21- let bstSurfAssetId = calculateAssetId(bstSurf)
22-[DeleteEntry(bstUsdtAssetStorageKey), DeleteEntry(bstSurfAssetStorageKey), BinaryEntry(bstUsdtAssetStorageKey, bstUsdtAssetId), BinaryEntry(bstSurfAssetStorageKey, bstSurfAssetId), bstUsdt, bstSurf]
23- }
24-
25-
26-
27-@Callable(i)
28-func sendInternalAssetsToTheCaller (id,amount) = {
29- let assetId = if ((id == 0))
30- then unwrap(getBinary(bstUsdtAssetStorageKey))
31- else if ((id == 1))
32- then unwrap(getBinary(bstSurfAssetStorageKey))
33- else throw("Wrong Asset Id")
34- let balance = assetBalance(this, assetId)
35- if ((balance >= amount))
36- then [ScriptTransfer(i.caller, amount, assetId)]
37- else [Reissue(assetId, amount, true), ScriptTransfer(i.caller, amount, assetId)]
7+func call (firstNumber,secondNumber,multiply) = {
8+ let bigIntResult = ((toBigInt(firstNumber) * toBigInt(multiply)) / (toBigInt(secondNumber) * toBigInt(multiply)))
9+ let result = toInt(bigIntResult)
10+[IntegerEntry("result", result)]
3811 }
3912
4013
4114 @Verifier(tx)
4215 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
4316

github/deemru/w8io/026f985 
38.12 ms