tx · 9y91Bw669JicyUpTKUtCTa1EpSY51fqNeYNE6GBcyB8g 3MvTsZLYhU4bGijfdULLDAUEiZVryxJVQPJ: -0.01400000 Waves 2023.01.15 18:46 [2406265] smart account 3MvTsZLYhU4bGijfdULLDAUEiZVryxJVQPJ > SELF 0.00000000 Waves
{ "type": 13, "id": "9y91Bw669JicyUpTKUtCTa1EpSY51fqNeYNE6GBcyB8g", "fee": 1400000, "feeAssetId": null, "timestamp": 1673797662695, "version": 2, "chainId": 84, "sender": "3MvTsZLYhU4bGijfdULLDAUEiZVryxJVQPJ", "senderPublicKey": "6hSe4di8vdVexXUoSJQ1unZB3n287fgHNBP7PberpTez", "proofs": [ "3TyTo6AgipR6kzayDHrsRYVCYTYLgbhmanZFcg29p3zjGKvbehu8h5bDcphNLeW3ASuz5siMddkwCJmFPJMTgTSw" ], "script": "base64:AAIFAAAAAAAAAA4IAhIAEgMKAQESAwoBAQAAAAAAAAADAAAAAWkBAAAAD3BsYWNlb3B0aW9uQ2FsbAAAAAAEAAAADWNhbGxlcmFkZHJlc3MJAAJYAAAAAQgIBQAAAAFpAAAABmNhbGxlcgAAAAVieXRlcwQAAAAScmVhZF9vcmFjbGVfc3RhdHVzCQEAAAARQGV4dHJOYXRpdmUoMTA1MykAAAACBQAAAAR0aGlzAgAAAA1vcmFjbGVfc3RhdHVzBAAAABRyZWFkX09wdGlvbkNvdW50ZXJJRAkBAAAAEUBleHRyTmF0aXZlKDEwNTApAAAAAgUAAAAEdGhpcwIAAAAOMW1fY29udHJhY3RfaWQEAAAACmdldGJ0Y2RhdGEJAQAAABFAZXh0ck5hdGl2ZSgxMDUzKQAAAAIFAAAABHRoaXMJAAEsAAAAAgIAAAAHMW1fYnRjXwkAAaQAAAABBQAAABRyZWFkX09wdGlvbkNvdW50ZXJJRAQAAAAGc3dhcExpCQAEtQAAAAIFAAAACmdldGJ0Y2RhdGECAAAAAV8EAAAABXByaWNlCQABkQAAAAIFAAAABnN3YXBMaQAAAAAAAAAAAA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QAAAAICAAAAA2RpdgkAAZEAAAACBQAAAAZzd2FwTGkAAAAAAAAAAAMFAAAAA25pbAAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5dJGJ/g==", "height": 2406265, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: C77P3aGL8Mw6XxZ6ig27HvkKKip9U6Smy5zPMCmgp1pm Next: DyWgXsgoUWzSifRFispC6Bu4RT59qs7bqBNjKSJtmMUW Diff:
Old | New | Differences | |
---|---|---|---|
46 | 46 | @Callable(a) | |
47 | 47 | func ClaimCall (q) = { | |
48 | 48 | let b = toBase58String(a.caller.bytes) | |
49 | - | let r = getStringValue(this, ((("Call_Start_End_" + b) + "_") + toString(q))) | |
50 | - | let s = split(r, "_") | |
51 | - | let t = s[0] | |
52 | - | let e = getStringValue(addressFromPublicKey(base58'6hSe4di8vdVexXUoSJQ1unZB3n287fgHNBP7PberpTez'), ("1m_btc_" + t)) | |
53 | - | [StringEntry("Start_valeu", t), DeleteEntry(((("Call_Start_End_" + b) + "_") + toString(q))), DeleteEntry(((("Call_" + b) + "_") + toString(q)))] | |
49 | + | let r = ((("Call_" + b) + "_") + toString(q)) | |
50 | + | let s = getStringValue(this, ((("Call_Start_End_" + b) + "_") + toString(q))) | |
51 | + | let t = split(s, "_") | |
52 | + | let u = t[0] | |
53 | + | let v = t[1] | |
54 | + | let e = getStringValue(addressFromPublicKey(base58'6hSe4di8vdVexXUoSJQ1unZB3n287fgHNBP7PberpTez'), ("1m_btc_" + u)) | |
55 | + | let w = getStringValue(addressFromPublicKey(base58'6hSe4di8vdVexXUoSJQ1unZB3n287fgHNBP7PberpTez'), ("1m_btc_" + v)) | |
56 | + | let x = (parseIntValue(e) - parseIntValue(w)) | |
57 | + | if ((x > 0)) | |
58 | + | then throw("Price is not Positive") | |
59 | + | else [StringEntry("Start_value", u), IntegerEntry("Price_Diff", x), DeleteEntry(((("Call_Start_End_" + b) + "_") + toString(q))), DeleteEntry(r)] | |
54 | 60 | } | |
55 | 61 | ||
56 | 62 | ||
57 | 63 | ||
58 | 64 | @Callable(a) | |
59 | - | func calldata ( | |
60 | - | let e = getStringValue(addressFromPublicKey(base58'6hSe4di8vdVexXUoSJQ1unZB3n287fgHNBP7PberpTez'), ("1m_btc_" + toString( | |
65 | + | func calldata (y) = { | |
66 | + | let e = getStringValue(addressFromPublicKey(base58'6hSe4di8vdVexXUoSJQ1unZB3n287fgHNBP7PberpTez'), ("1m_btc_" + toString(y))) | |
61 | 67 | let f = split(e, "_") | |
62 | 68 | let g = f[0] | |
63 | - | let | |
64 | - | let | |
65 | - | let | |
69 | + | let z = f[1] | |
70 | + | let A = f[2] | |
71 | + | let B = f[3] | |
66 | 72 | [StringEntry("price", f[0]), StringEntry("time", f[1]), StringEntry("blockheight", f[2]), StringEntry("div", f[3])] | |
67 | 73 | } | |
68 | 74 | ||
69 | 75 | ||
70 | - | @Verifier( | |
71 | - | func | |
76 | + | @Verifier(C) | |
77 | + | func D () = sigVerify(C.bodyBytes, C.proofs[0], C.senderPublicKey) | |
72 | 78 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | ||
5 | 5 | ||
6 | 6 | @Callable(a) | |
7 | 7 | func placeoptionCall () = { | |
8 | 8 | let b = toBase58String(a.caller.bytes) | |
9 | 9 | let c = getStringValue(this, "oracle_status") | |
10 | 10 | let d = getIntegerValue(this, "1m_contract_id") | |
11 | 11 | let e = getStringValue(this, ("1m_btc_" + toString(d))) | |
12 | 12 | let f = split(e, "_") | |
13 | 13 | let g = f[0] | |
14 | 14 | let h = parseIntValue(f[2]) | |
15 | 15 | let i = (height - h) | |
16 | 16 | let j = (d + 15) | |
17 | 17 | let k = { | |
18 | 18 | let l = getInteger(this, "Total_Calls") | |
19 | 19 | if ($isInstanceOf(l, "Int")) | |
20 | 20 | then { | |
21 | 21 | let m = l | |
22 | 22 | m | |
23 | 23 | } | |
24 | 24 | else 0 | |
25 | 25 | } | |
26 | 26 | let n = (k + 1) | |
27 | 27 | let o = { | |
28 | 28 | let l = getInteger(this, (b + "_Total_Calls")) | |
29 | 29 | if ($isInstanceOf(l, "Int")) | |
30 | 30 | then { | |
31 | 31 | let m = l | |
32 | 32 | m | |
33 | 33 | } | |
34 | 34 | else 0 | |
35 | 35 | } | |
36 | 36 | let p = (o + 1) | |
37 | 37 | if ((i > 2)) | |
38 | 38 | then throw("Something Wrong with Oracle or Height is not matched.") | |
39 | 39 | else if ((c == "Close")) | |
40 | 40 | then throw("Oracle is closed. Wait Until Oracle is Turned On.") | |
41 | 41 | else [StringEntry(((("Call_" + b) + "_") + toString(p)), g), StringEntry(((("Call_Start_End_" + b) + "_") + toString(p)), ((toString(d) + "_") + toString(j))), IntegerEntry("Total_Calls", n), IntegerEntry((b + "_Total_Calls"), p)] | |
42 | 42 | } | |
43 | 43 | ||
44 | 44 | ||
45 | 45 | ||
46 | 46 | @Callable(a) | |
47 | 47 | func ClaimCall (q) = { | |
48 | 48 | let b = toBase58String(a.caller.bytes) | |
49 | - | let r = getStringValue(this, ((("Call_Start_End_" + b) + "_") + toString(q))) | |
50 | - | let s = split(r, "_") | |
51 | - | let t = s[0] | |
52 | - | let e = getStringValue(addressFromPublicKey(base58'6hSe4di8vdVexXUoSJQ1unZB3n287fgHNBP7PberpTez'), ("1m_btc_" + t)) | |
53 | - | [StringEntry("Start_valeu", t), DeleteEntry(((("Call_Start_End_" + b) + "_") + toString(q))), DeleteEntry(((("Call_" + b) + "_") + toString(q)))] | |
49 | + | let r = ((("Call_" + b) + "_") + toString(q)) | |
50 | + | let s = getStringValue(this, ((("Call_Start_End_" + b) + "_") + toString(q))) | |
51 | + | let t = split(s, "_") | |
52 | + | let u = t[0] | |
53 | + | let v = t[1] | |
54 | + | let e = getStringValue(addressFromPublicKey(base58'6hSe4di8vdVexXUoSJQ1unZB3n287fgHNBP7PberpTez'), ("1m_btc_" + u)) | |
55 | + | let w = getStringValue(addressFromPublicKey(base58'6hSe4di8vdVexXUoSJQ1unZB3n287fgHNBP7PberpTez'), ("1m_btc_" + v)) | |
56 | + | let x = (parseIntValue(e) - parseIntValue(w)) | |
57 | + | if ((x > 0)) | |
58 | + | then throw("Price is not Positive") | |
59 | + | else [StringEntry("Start_value", u), IntegerEntry("Price_Diff", x), DeleteEntry(((("Call_Start_End_" + b) + "_") + toString(q))), DeleteEntry(r)] | |
54 | 60 | } | |
55 | 61 | ||
56 | 62 | ||
57 | 63 | ||
58 | 64 | @Callable(a) | |
59 | - | func calldata ( | |
60 | - | let e = getStringValue(addressFromPublicKey(base58'6hSe4di8vdVexXUoSJQ1unZB3n287fgHNBP7PberpTez'), ("1m_btc_" + toString( | |
65 | + | func calldata (y) = { | |
66 | + | let e = getStringValue(addressFromPublicKey(base58'6hSe4di8vdVexXUoSJQ1unZB3n287fgHNBP7PberpTez'), ("1m_btc_" + toString(y))) | |
61 | 67 | let f = split(e, "_") | |
62 | 68 | let g = f[0] | |
63 | - | let | |
64 | - | let | |
65 | - | let | |
69 | + | let z = f[1] | |
70 | + | let A = f[2] | |
71 | + | let B = f[3] | |
66 | 72 | [StringEntry("price", f[0]), StringEntry("time", f[1]), StringEntry("blockheight", f[2]), StringEntry("div", f[3])] | |
67 | 73 | } | |
68 | 74 | ||
69 | 75 | ||
70 | - | @Verifier( | |
71 | - | func | |
76 | + | @Verifier(C) | |
77 | + | func D () = sigVerify(C.bodyBytes, C.proofs[0], C.senderPublicKey) | |
72 | 78 |
github/deemru/w8io/169f3d6 27.55 ms ◑