tx · AxaRVAcjymW1Vuh2jk6ZNnFbh75dAXxjAqirjJ5n4cHv 3NC9boevS259eTsMAkFAxCPorzK4Z9bpWje: -0.01400000 Waves 2023.01.16 03:08 [2406759] smart account 3NC9boevS259eTsMAkFAxCPorzK4Z9bpWje > SELF 0.00000000 Waves
{ "type": 13, "id": "AxaRVAcjymW1Vuh2jk6ZNnFbh75dAXxjAqirjJ5n4cHv", "fee": 1400000, "feeAssetId": null, "timestamp": 1673827722868, "version": 2, "chainId": 84, "sender": "3NC9boevS259eTsMAkFAxCPorzK4Z9bpWje", "senderPublicKey": "515tSAyMUbAb8kKjcpGDpqALGfCgcwfWmWKKkcBKTcGB", "proofs": [ "58G7z9hUUhX14ZaPMggEQk72ZGtohzHo1xWAKcFvsG7xG42QpQoo1N3bhUSJ2H2frNKvbMjZxDnHnAYurLJ2jwBs" ], "script": "base64:AAIFAAAAAAAAAA4IAhIAEgMKAQgSAwoBAQAAAAAAAAADAAAAAWkBAAAAD3BsYWNlb3B0aW9uQ2FsbAAAAAAEAAAADWNhbGxlcmFkZHJlc3MJAAJYAAAAAQgIBQAAAAFpAAAABmNhbGxlcgAAAAVieXRlcwQAAAAScmVhZF9vcmFjbGVfc3RhdHVzCQEAAAARQGV4dHJOYXRpdmUoMTA1MykAAAACBQAAAAR0aGlzAgAAAA1vcmFjbGVfc3RhdHVzBAAAABRyZWFkX09wdGlvbkNvdW50ZXJJRAkBAAAAEUBleHRyTmF0aXZlKDEwNTApAAAAAgUAAAAEdGhpcwIAAAAOMW1fY29udHJhY3RfaWQEAAAACmdldGJ0Y2RhdGEJAQAAABFAZXh0ck5hdGl2ZSgxMDUzKQAAAAIFAAAABHRoaXMJAAEsAAAAAgIAAAAHMW1fYnRjXwkAAaQAAAABBQAAABRyZWFkX09wdGlvbkNvdW50ZXJJRAQAAAAGc3dhcExpCQAEtQAAAAIFAAAACmdldGJ0Y2RhdGECAAAAAV8EAAAABXByaWNlCQABkQAAAAIFAAAABnN3YXBMaQAAAAA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AAAAAAAAAAAABAAAAAR0aW1lCQABkQAAAAIFAAAABnN3YXBMaQAAAAAAAAAAAQQAAAALYmxvY2toZWlnaHQJAAGRAAAAAgUAAAAGc3dhcExpAAAAAAAAAAACBAAAAANkaXYJAAGRAAAAAgUAAAAGc3dhcExpAAAAAAAAAAADCQAETAAAAAIJAQAAAAtTdHJpbmdFbnRyeQAAAAICAAAABXByaWNlCQABkQAAAAIFAAAABnN3YXBMaQAAAAAAAAAAAAkABEwAAAACCQEAAAALU3RyaW5nRW50cnkAAAACAgAAAAR0aW1lCQABkQAAAAIFAAAABnN3YXBMaQAAAAAAAAAAAQkABEwAAAACCQEAAAALU3RyaW5nRW50cnkAAAACAgAAAAtibG9ja2hlaWdodAkAAZEAAAACBQAAAAZzd2FwTGkAAAAAAAAAAAIJAARMAAAAAgkBAAAAC1N0cmluZ0VudHJ5AAAAAgIAAAADZGl2CQABkQAAAAIFAAAABnN3YXBMaQAAAAAAAAAAAwUAAAADbmlsAAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXkpJeWm", "height": 2406759, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: FJWaNotxw57taUt1h9L95MgRvkFVeQ7ZoDUvBZ5yGef9 Next: EEpxTwsQpFed8QEu9Ur8jouxMqsg23BWgqbiseVUv21b Diff:
Old | New | Differences | |
---|---|---|---|
47 | 47 | @Callable(a) | |
48 | 48 | func ClaimCall (r) = { | |
49 | 49 | let b = toBase58String(a.caller.bytes) | |
50 | - | let s = getStringValue(this, ((("Call_" + b) + "_") + r)) | |
51 | - | let t = getStringValue(this, ((("Call_Start_End_" + b) + "_") + r)) | |
52 | - | let u = split(t, "_") | |
53 | - | let v = u[0] | |
54 | - | let w = u[1] | |
55 | - | let x = getStringValue(this, ("1m_btc_" + v)) | |
56 | - | let y = split(x, "_") | |
57 | - | let z = y[0] | |
58 | - | let A = getStringValue(this, ("1m_btc_" + w)) | |
59 | - | let B = split(A, "_") | |
60 | - | let C = B[0] | |
61 | - | let D = (parseIntValue(C) - parseIntValue(z)) | |
62 | - | if ((0 > D)) | |
63 | - | then throw("Price is less.") | |
64 | - | else [StringEntry("Contract_Start_value", v), StringEntry("Contract_End_value", w), StringEntry("Blank1", z), StringEntry("Blank2", C), IntegerEntry("Diff", D), DeleteEntry(((("Call_Start_End_" + b) + "_") + r)), DeleteEntry(s)] | |
50 | + | let s = if ((size(a.payments) == 1)) | |
51 | + | then a.payments[0] | |
52 | + | else throw("No payment attached, Please Attach Tokens in payment[1].") | |
53 | + | let t = getStringValue(this, ((("Call_" + b) + "_") + r)) | |
54 | + | let u = getStringValue(this, ((("Call_Start_End_" + b) + "_") + r)) | |
55 | + | let v = split(u, "_") | |
56 | + | let w = v[0] | |
57 | + | let x = v[1] | |
58 | + | let y = getStringValue(this, ("1m_btc_" + w)) | |
59 | + | let z = split(y, "_") | |
60 | + | let A = z[0] | |
61 | + | let B = getStringValue(this, ("1m_btc_" + x)) | |
62 | + | let C = split(B, "_") | |
63 | + | let D = C[0] | |
64 | + | let E = (parseIntValue(D) - parseIntValue(A)) | |
65 | + | if ((0 > E)) | |
66 | + | then [StringEntry("Contract_Start_value", w), StringEntry("Contract_End_value", x), StringEntry("Blank1", A), StringEntry("Blank2", D), IntegerEntry("Diff", E), StringEntry("message", "You lose!"), DeleteEntry(((("Call_Start_End_" + b) + "_") + r)), DeleteEntry(t)] | |
67 | + | else [StringEntry("Contract_Start_value", w), StringEntry("Contract_End_value", x), StringEntry("Blank1", A), StringEntry("Blank2", D), IntegerEntry("Diff", E), StringEntry("message", "You Win!"), DeleteEntry(((("Call_Start_End_" + b) + "_") + r)), DeleteEntry(t)] | |
65 | 68 | } | |
66 | 69 | ||
67 | 70 | ||
68 | 71 | ||
69 | 72 | @Callable(a) | |
70 | - | func calldata ( | |
71 | - | let e = getStringValue(this, ("1m_btc_" + toString( | |
73 | + | func calldata (F) = { | |
74 | + | let e = getStringValue(this, ("1m_btc_" + toString(F))) | |
72 | 75 | let f = split(e, "_") | |
73 | 76 | let g = f[0] | |
74 | - | let | |
75 | - | let | |
76 | - | let | |
77 | + | let G = f[1] | |
78 | + | let H = f[2] | |
79 | + | let I = f[3] | |
77 | 80 | [StringEntry("price", f[0]), StringEntry("time", f[1]), StringEntry("blockheight", f[2]), StringEntry("div", f[3])] | |
78 | 81 | } | |
79 | 82 | ||
80 | 83 | ||
81 | - | @Verifier( | |
82 | - | func | |
84 | + | @Verifier(J) | |
85 | + | func K () = sigVerify(J.bodyBytes, J.proofs[0], J.senderPublicKey) | |
83 | 86 |
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 = 1 | |
17 | 17 | let k = (d + j) | |
18 | 18 | let l = { | |
19 | 19 | let m = getInteger(this, "Total_Calls") | |
20 | 20 | if ($isInstanceOf(m, "Int")) | |
21 | 21 | then { | |
22 | 22 | let n = m | |
23 | 23 | n | |
24 | 24 | } | |
25 | 25 | else 0 | |
26 | 26 | } | |
27 | 27 | let o = (l + 1) | |
28 | 28 | let p = { | |
29 | 29 | let m = getInteger(this, (b + "_Total_Calls")) | |
30 | 30 | if ($isInstanceOf(m, "Int")) | |
31 | 31 | then { | |
32 | 32 | let n = m | |
33 | 33 | n | |
34 | 34 | } | |
35 | 35 | else 0 | |
36 | 36 | } | |
37 | 37 | let q = (p + 1) | |
38 | 38 | if ((i > 2)) | |
39 | 39 | then throw("Something Wrong with Oracle or Height is not matched.") | |
40 | 40 | else if ((c == "Close")) | |
41 | 41 | then throw("Oracle is closed. Wait Until Oracle is Turned On.") | |
42 | 42 | else [StringEntry(((("Call_" + b) + "_") + toString(q)), g), StringEntry(((("Call_Start_End_" + b) + "_") + toString(q)), ((toString(d) + "_") + toString(k))), IntegerEntry("Total_Calls", o), IntegerEntry((b + "_Total_Calls"), q)] | |
43 | 43 | } | |
44 | 44 | ||
45 | 45 | ||
46 | 46 | ||
47 | 47 | @Callable(a) | |
48 | 48 | func ClaimCall (r) = { | |
49 | 49 | let b = toBase58String(a.caller.bytes) | |
50 | - | let s = getStringValue(this, ((("Call_" + b) + "_") + r)) | |
51 | - | let t = getStringValue(this, ((("Call_Start_End_" + b) + "_") + r)) | |
52 | - | let u = split(t, "_") | |
53 | - | let v = u[0] | |
54 | - | let w = u[1] | |
55 | - | let x = getStringValue(this, ("1m_btc_" + v)) | |
56 | - | let y = split(x, "_") | |
57 | - | let z = y[0] | |
58 | - | let A = getStringValue(this, ("1m_btc_" + w)) | |
59 | - | let B = split(A, "_") | |
60 | - | let C = B[0] | |
61 | - | let D = (parseIntValue(C) - parseIntValue(z)) | |
62 | - | if ((0 > D)) | |
63 | - | then throw("Price is less.") | |
64 | - | else [StringEntry("Contract_Start_value", v), StringEntry("Contract_End_value", w), StringEntry("Blank1", z), StringEntry("Blank2", C), IntegerEntry("Diff", D), DeleteEntry(((("Call_Start_End_" + b) + "_") + r)), DeleteEntry(s)] | |
50 | + | let s = if ((size(a.payments) == 1)) | |
51 | + | then a.payments[0] | |
52 | + | else throw("No payment attached, Please Attach Tokens in payment[1].") | |
53 | + | let t = getStringValue(this, ((("Call_" + b) + "_") + r)) | |
54 | + | let u = getStringValue(this, ((("Call_Start_End_" + b) + "_") + r)) | |
55 | + | let v = split(u, "_") | |
56 | + | let w = v[0] | |
57 | + | let x = v[1] | |
58 | + | let y = getStringValue(this, ("1m_btc_" + w)) | |
59 | + | let z = split(y, "_") | |
60 | + | let A = z[0] | |
61 | + | let B = getStringValue(this, ("1m_btc_" + x)) | |
62 | + | let C = split(B, "_") | |
63 | + | let D = C[0] | |
64 | + | let E = (parseIntValue(D) - parseIntValue(A)) | |
65 | + | if ((0 > E)) | |
66 | + | then [StringEntry("Contract_Start_value", w), StringEntry("Contract_End_value", x), StringEntry("Blank1", A), StringEntry("Blank2", D), IntegerEntry("Diff", E), StringEntry("message", "You lose!"), DeleteEntry(((("Call_Start_End_" + b) + "_") + r)), DeleteEntry(t)] | |
67 | + | else [StringEntry("Contract_Start_value", w), StringEntry("Contract_End_value", x), StringEntry("Blank1", A), StringEntry("Blank2", D), IntegerEntry("Diff", E), StringEntry("message", "You Win!"), DeleteEntry(((("Call_Start_End_" + b) + "_") + r)), DeleteEntry(t)] | |
65 | 68 | } | |
66 | 69 | ||
67 | 70 | ||
68 | 71 | ||
69 | 72 | @Callable(a) | |
70 | - | func calldata ( | |
71 | - | let e = getStringValue(this, ("1m_btc_" + toString( | |
73 | + | func calldata (F) = { | |
74 | + | let e = getStringValue(this, ("1m_btc_" + toString(F))) | |
72 | 75 | let f = split(e, "_") | |
73 | 76 | let g = f[0] | |
74 | - | let | |
75 | - | let | |
76 | - | let | |
77 | + | let G = f[1] | |
78 | + | let H = f[2] | |
79 | + | let I = f[3] | |
77 | 80 | [StringEntry("price", f[0]), StringEntry("time", f[1]), StringEntry("blockheight", f[2]), StringEntry("div", f[3])] | |
78 | 81 | } | |
79 | 82 | ||
80 | 83 | ||
81 | - | @Verifier( | |
82 | - | func | |
84 | + | @Verifier(J) | |
85 | + | func K () = sigVerify(J.bodyBytes, J.proofs[0], J.senderPublicKey) | |
83 | 86 |
github/deemru/w8io/169f3d6 44.89 ms ◑