tx · 8gZfH6eH8SCFnXwCTwxk1HrzH8ZxVh1E69oykQHe33e9

3N37eLdtWjhS31FGHvu2HpGLreF11i58Bv6:  -0.01000000 Waves

2023.03.31 10:29 [2513822] smart account 3N37eLdtWjhS31FGHvu2HpGLreF11i58Bv6 > SELF 0.00000000 Waves

{ "type": 13, "id": "8gZfH6eH8SCFnXwCTwxk1HrzH8ZxVh1E69oykQHe33e9", "fee": 1000000, "feeAssetId": null, "timestamp": 1680247769329, "version": 2, "chainId": 84, "sender": "3N37eLdtWjhS31FGHvu2HpGLreF11i58Bv6", "senderPublicKey": "3pW4h7e3NAcqGkvc1AyziZLMPSsG2eXvCGU7vLxPXkaq", "proofs": [ "4hyNPAN2vgkcPWY5fYigy4Xnj8Hv8WGdVtZpCr9woTCHA8RJDDPbqvVDMfzPDRmYxqQB1vXmP7F9Jfvzs9Ujyky7" ], "script": "base64:BgIKCAISABIECgIBAQYAFmJzdFVzZHRBc3NldFN0b3JhZ2VLZXkCDmJzdFVzZHRBc3NldElkABZic3RTdXJmQXNzZXRTdG9yYWdlS2V5Ag5ic3RTdXJmQXNzZXRJZAALc3VyZk1vY2tLZXkCCHN1cmZNb2NrAAl3eE1vY2tLZXkCBnd4TW9jawAKeHRuTW9ja0tleQIHeHRuTW9jawEGdW53cmFwAQRkYXRhBAckbWF0Y2gwBQRkYXRhAwkAAQIFByRtYXRjaDACCkJ5dGVWZWN0b3IEAXYFByRtYXRjaDAFAXYJAAIBAiFFeHBlY3RlZCB0aGF0IGRhdGEgd2lsbCBiZSBzdHJpbmcCAWkBC2lzc3VlQXNzZXRzAAQIc3VyZk1vY2sJAMMIBwIJU1VSRl9Nb2NrAgAAgK3iBAAGBgUEdW5pdAAABA9zdXJmTW9ja0Fzc2V0SWQJALgIAQUIc3VyZk1vY2sEBnd4TW9jawkAwwgHAgdXWF9Nb2NrAgAAgK3iBAAGBgUEdW5pdAAABA13eE1vY2tBc3NldElkCQC4CAEFBnd4TW9jawQHeHRuTW9jawkAww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FYhUaQ==", "height": 2513822, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: PQdd2ZaZacPfM4MfmHywRt2mRvL384Z2hF1dih7ZvMf Next: EMBkHzEG1vyJKDjwbE514rtd61CJEMAVm4168Ktrm1Yv Full:
OldNewDifferences
1-{-# STDLIB_VERSION 5 #-}
1+{-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4+let a = "bstUsdtAssetId"
45
6+let b = "bstSurfAssetId"
57
6-@Callable(a)
7-func call (b,c,d) = {
8- let e = fraction(toBigInt(b), toBigInt(d), toBigInt(c), HALFUP)
9- let f = toInt(e)
10- let g = fraction(e, toBigInt(c), toBigInt(d), HALFUP)
11-[IntegerEntry("result", f), IntegerEntry("backwardResult", toInt(g))]
8+let c = "surfMock"
9+
10+let d = "wxMock"
11+
12+let e = "xtnMock"
13+
14+func f (g) = {
15+ let h = g
16+ if ($isInstanceOf(h, "ByteVector"))
17+ then {
18+ let i = h
19+ i
20+ }
21+ else throw("Expected that data will be string")
1222 }
1323
1424
15-@Verifier(h)
16-func i () = sigVerify(h.bodyBytes, h.proofs[0], h.senderPublicKey)
25+@Callable(j)
26+func issueAssets () = {
27+ let k = Issue("SURF_Mock", "", 10000000, 6, true, unit, 0)
28+ let l = calculateAssetId(k)
29+ let m = Issue("WX_Mock", "", 10000000, 6, true, unit, 0)
30+ let n = calculateAssetId(m)
31+ let o = Issue("XTN_Mock", "", 10000000, 6, true, unit, 0)
32+ let p = calculateAssetId(o)
33+[DeleteEntry(a), DeleteEntry(b), StringEntry(c, toBase58String(l)), StringEntry(d, toBase58String(n)), StringEntry(e, toBase58String(p)), k, m, o]
34+ }
35+
36+
37+
38+@Callable(j)
39+func sendInternalAssetsToTheCaller (q,r) = {
40+ let s = if ((q == 0))
41+ then f(getBinary(a))
42+ else if ((q == 1))
43+ then f(getBinary(b))
44+ else throw("Wrong Asset Id")
45+ let t = assetBalance(this, s)
46+ if ((t >= r))
47+ then [ScriptTransfer(j.caller, r, s)]
48+ else [Reissue(s, r, true), ScriptTransfer(j.caller, r, s)]
49+ }
50+
51+
52+@Verifier(u)
53+func v () = sigVerify(u.bodyBytes, u.proofs[0], u.senderPublicKey)
1754

github/deemru/w8io/026f985 
72.82 ms