tx · HxLBuLMSbEa5djHbyzLLxFs8gKi9fx38jYVPhVPorkFf 3N2FodsKP7M3AQ3k3XHbMggtKaeiJEv36gk: -0.01400000 Waves 2023.05.21 13:44 [2587639] smart account 3N2FodsKP7M3AQ3k3XHbMggtKaeiJEv36gk > SELF 0.00000000 Waves
{ "type": 13, "id": "HxLBuLMSbEa5djHbyzLLxFs8gKi9fx38jYVPhVPorkFf", "fee": 1400000, "feeAssetId": null, "timestamp": 1684665895820, "version": 2, "chainId": 84, "sender": "3N2FodsKP7M3AQ3k3XHbMggtKaeiJEv36gk", "senderPublicKey": "78Bt5i3ukexi4JyJKXa9f3aGmpTT1t79wSaBXNy68zWU", "proofs": [ "2zJWizcUHo8uSmXewsVp5x9UUxwJ2yT3Pkik6SatBY3d4z5hBTgcAoJvDb9JXGKNKhvdXzRbRiuj6A7PKs9nvUtH" ], "script": "base64:AAIFAAAAAAAAACsIAhIDCgEIEgMKAQgSBAoCCAgSAwoBARIFCgMICAESBAoCCAgSBQoDCAgBAAAABQAAAAAIYWRtaW5tc2cCAAAAIU9ubHkgYWRtaW4gY2FuIGNhbGwgdGhpcyBmdW5jdGlvbgEAAAAHaXNBZG1pbgAAAAEAAAAHYWRkcmVzcwQAAAABYwkAAlgAAAABBQAAAAdhZGRyZXNzAwkBAAAACWlzRGVmaW5lZAAAAAEJAAQiAAAAAQIAAAAFYWRtaW4DAwkAAAAAAAACBQAAAAFjCQEAAAARQGV4dHJOYXRpdmUoMTA1OCkAAAABAgAAAAVhZG1pbgYJAAAAAAAAAgUAAAABYwkAAlgAAAABCAUAAAAEdGhpcwAAAAVieXRlcwYHAwkAAAAAAAACBQAAAAFjCQACWAAAAAEIBQAAAAR0aGlzAAAABWJ5dGVzBgcBAAAADGdldFZhbGlkUGFpcgAAAAIAAAAGYXNzZXQxAAAABmFzc2V0MgMJAQAAAAlpc0RlZmluZWQAAAABCQAEIAAAAAEJAAEsAAAAAgkAASwAAAACBQAAAAZhc3NldDECAAAAAV8FAAAAB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nRyeQAAAAIJAAEsAAAAAgkAASwAAAACCQABLAAAAAIFAAAACmFzc2V0VmFsdWUCAAAAAV8FAAAACmFzc2V0UHJpY2UCAAAAB19hc3NldDEFAAAACmFzc2V0VmFsdWUJAARMAAAAAgkBAAAAC1N0cmluZ0VudHJ5AAAAAgkAASwAAAACCQABLAAAAAIJAAEsAAAAAgUAAAAKYXNzZXRWYWx1ZQIAAAABXwUAAAAKYXNzZXRQcmljZQIAAAAHX2Fzc2V0MgUAAAAKYXNzZXRQcmljZQkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgkAASwAAAACCQABLAAAAAIJAAEsAAAAAgUAAAAKYXNzZXRWYWx1ZQIAAAABXwUAAAAKYXNzZXRQcmljZQIAAAAGX3RvdGFsBQAAAAJubgUAAAADbmlsCQAAAgAAAAEFAAAACGFkbWlubXNnAAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXlev0Dq", "height": 2587639, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 47bS6j3k28u2U9ZVdtw1vjcDnJHMXTpvVsMhkCzDNZdo Next: 8ukXYbYrwWMkeMbGeNL6q5MmYUF65Paja6NK61ZJtPNS Diff:
Old | New | Differences | |
---|---|---|---|
17 | 17 | } | |
18 | 18 | ||
19 | 19 | ||
20 | - | func getValidPair (asset1,asset2) = if (isDefined( | |
20 | + | func getValidPair (asset1,asset2) = if (isDefined(getBoolean(((asset1 + "_") + asset2)))) | |
21 | 21 | then ((asset1 + "_") + asset2) | |
22 | - | else if (isDefined( | |
22 | + | else if (isDefined(getBoolean(((asset2 + "_") + asset1)))) | |
23 | 23 | then ((asset2 + "_") + asset1) | |
24 | 24 | else "" | |
25 | 25 | ||
26 | 26 | ||
27 | 27 | func isValidPair (asset1,asset2) = { | |
28 | - | let x = getValidPair(asset1, asset2) | |
29 | - | if ((x == "")) | |
30 | - | then false | |
31 | - | else true | |
28 | + | let x = match getValidPair(asset1, asset2) { | |
29 | + | case c: String => | |
30 | + | if ((c == "")) | |
31 | + | then false | |
32 | + | else true | |
33 | + | case _ => | |
34 | + | false | |
35 | + | } | |
36 | + | x | |
32 | 37 | } | |
33 | 38 | ||
34 | 39 | ||
61 | 66 | func addPair (asset1,asset2) = if (isAdmin(i.caller.bytes)) | |
62 | 67 | then if (isValidPair(asset1, asset2)) | |
63 | 68 | then throw("This pair has been previously added") | |
64 | - | else | |
69 | + | else [BooleanEntry(((asset1 + "_") + asset2), true)] | |
65 | 70 | else throw(adminmsg) | |
66 | 71 | ||
67 | 72 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let adminmsg = "Only admin can call this function" | |
5 | 5 | ||
6 | 6 | func isAdmin (address) = { | |
7 | 7 | let c = toBase58String(address) | |
8 | 8 | if (isDefined(getString("admin"))) | |
9 | 9 | then if (if ((c == getStringValue("admin"))) | |
10 | 10 | then true | |
11 | 11 | else (c == toBase58String(this.bytes))) | |
12 | 12 | then true | |
13 | 13 | else false | |
14 | 14 | else if ((c == toBase58String(this.bytes))) | |
15 | 15 | then true | |
16 | 16 | else false | |
17 | 17 | } | |
18 | 18 | ||
19 | 19 | ||
20 | - | func getValidPair (asset1,asset2) = if (isDefined( | |
20 | + | func getValidPair (asset1,asset2) = if (isDefined(getBoolean(((asset1 + "_") + asset2)))) | |
21 | 21 | then ((asset1 + "_") + asset2) | |
22 | - | else if (isDefined( | |
22 | + | else if (isDefined(getBoolean(((asset2 + "_") + asset1)))) | |
23 | 23 | then ((asset2 + "_") + asset1) | |
24 | 24 | else "" | |
25 | 25 | ||
26 | 26 | ||
27 | 27 | func isValidPair (asset1,asset2) = { | |
28 | - | let x = getValidPair(asset1, asset2) | |
29 | - | if ((x == "")) | |
30 | - | then false | |
31 | - | else true | |
28 | + | let x = match getValidPair(asset1, asset2) { | |
29 | + | case c: String => | |
30 | + | if ((c == "")) | |
31 | + | then false | |
32 | + | else true | |
33 | + | case _ => | |
34 | + | false | |
35 | + | } | |
36 | + | x | |
32 | 37 | } | |
33 | 38 | ||
34 | 39 | ||
35 | 40 | func checkAssetId (asset) = { | |
36 | 41 | let a = match asset { | |
37 | 42 | case v: ByteVector => | |
38 | 43 | toBase58String(v) | |
39 | 44 | case _ => | |
40 | 45 | "WAVES" | |
41 | 46 | } | |
42 | 47 | a | |
43 | 48 | } | |
44 | 49 | ||
45 | 50 | ||
46 | 51 | @Callable(i) | |
47 | 52 | func addAdmin (address) = if (isAdmin(i.caller.bytes)) | |
48 | 53 | then [StringEntry("admin", address)] | |
49 | 54 | else throw(adminmsg) | |
50 | 55 | ||
51 | 56 | ||
52 | 57 | ||
53 | 58 | @Callable(i) | |
54 | 59 | func setOracle (address) = if (isAdmin(i.caller.bytes)) | |
55 | 60 | then [StringEntry("oracle", address)] | |
56 | 61 | else throw(adminmsg) | |
57 | 62 | ||
58 | 63 | ||
59 | 64 | ||
60 | 65 | @Callable(i) | |
61 | 66 | func addPair (asset1,asset2) = if (isAdmin(i.caller.bytes)) | |
62 | 67 | then if (isValidPair(asset1, asset2)) | |
63 | 68 | then throw("This pair has been previously added") | |
64 | - | else | |
69 | + | else [BooleanEntry(((asset1 + "_") + asset2), true)] | |
65 | 70 | else throw(adminmsg) | |
66 | 71 | ||
67 | 72 | ||
68 | 73 | ||
69 | 74 | @Callable(i) | |
70 | 75 | func feeSwap (fee) = if (isAdmin(i.caller.bytes)) | |
71 | 76 | then [IntegerEntry("fee", fee)] | |
72 | 77 | else throw(adminmsg) | |
73 | 78 | ||
74 | 79 | ||
75 | 80 | ||
76 | 81 | @Callable(i) | |
77 | 82 | func Swap (asset1,asset2,price) = { | |
78 | 83 | let D = match i.payments[0].assetId { | |
79 | 84 | case o: Unit => | |
80 | 85 | pow(10, 0, 8, 0, 0, HALFUP) | |
81 | 86 | case x: ByteVector => | |
82 | 87 | pow(10, 0, value(assetInfo(x)).decimals, 0, 0, HALFUP) | |
83 | 88 | case _ => | |
84 | 89 | throw("Match error") | |
85 | 90 | } | |
86 | 91 | if (isValidPair(asset1, asset2)) | |
87 | 92 | then if (!(isDefined(getString((getValidPair(asset1, asset2) + toBase58String(i.caller.bytes)))))) | |
88 | 93 | then if ((checkAssetId(i.payments[0].assetId) == getStringValue((getValidPair(asset1, asset2) + "_asset2")))) | |
89 | 94 | then if ((price == getIntegerValue((getValidPair(asset1, asset2) + "_price")))) | |
90 | 95 | then if (((i.payments[0].amount / price) > getIntegerValue((getValidPair(asset1, asset2) + "_total")))) | |
91 | 96 | then [ScriptTransfer(Address(i.caller.bytes), ((i.payments[0].amount * D) / price), fromBase58String(getStringValue((getValidPair(asset1, asset2) + "_asset1")))), IntegerEntry((getValidPair(asset1, asset2) + toBase58String(i.caller.bytes)), i.payments[0].amount), IntegerEntry(((getValidPair(asset1, asset2) + toBase58String(i.caller.bytes)) + "_price"), price), IntegerEntry(((getValidPair(asset1, asset2) + toBase58String(i.caller.bytes)) + "_height"), height), IntegerEntry(((getValidPair(asset1, asset2) + toBase58String(i.caller.bytes)) + "_received"), ((i.payments[0].amount * D) / price)), StringEntry(((getValidPair(asset1, asset2) + toBase58String(i.caller.bytes)) + "_asset"), checkAssetId(i.payments[0].assetId)), IntegerEntry((getValidPair(asset1, asset2) + "_total"), (getIntegerValue((getValidPair(asset1, asset2) + "_total")) - ((i.payments[0].amount * D) / price)))] | |
92 | 97 | else throw("Amount above that available for Swap. Try decreasing the value.") | |
93 | 98 | else throw("Invalid price.") | |
94 | 99 | else throw("Invalid payment asset. Use the second asset of the pair") | |
95 | 100 | else throw("You already have a Guaranteed Swap made before, cancel the previous one or withdraw the current one to create a new Swap.") | |
96 | 101 | else throw("Invalid Pair.") | |
97 | 102 | } | |
98 | 103 | ||
99 | 104 | ||
100 | 105 | ||
101 | 106 | @Callable(i) | |
102 | 107 | func Withdraw (asset1,asset2) = if (isValidPair(asset1, asset2)) | |
103 | 108 | then if (isDefined(getString((getValidPair(asset1, asset2) + toBase58String(i.caller.bytes))))) | |
104 | 109 | then if ((checkAssetId(i.payments[0].assetId) == getStringValue((getValidPair(asset1, asset2) + "_asset1")))) | |
105 | 110 | then if ((i.payments[0].amount == getIntegerValue(((getValidPair(asset1, asset2) + toBase58String(i.caller.bytes)) + "_received")))) | |
106 | 111 | then if ((i.payments[1].amount == ((i.payments[0].amount / getIntegerValue("fee")) * 100))) | |
107 | 112 | then [DeleteEntry((getValidPair(asset1, asset2) + toBase58String(i.caller.bytes))), DeleteEntry(((getValidPair(asset1, asset2) + toBase58String(i.caller.bytes)) + "_price")), DeleteEntry(((getValidPair(asset1, asset2) + toBase58String(i.caller.bytes)) + "_height")), DeleteEntry(((getValidPair(asset1, asset2) + toBase58String(i.caller.bytes)) + "_received")), DeleteEntry(((getValidPair(asset1, asset2) + toBase58String(i.caller.bytes)) + "_asset")), ScriptTransfer(Address(i.caller.bytes), getIntegerValue((getValidPair(asset1, asset2) + toBase58String(i.caller.bytes))), fromBase58String(getStringValue((getValidPair(asset1, asset2) + "_asset2"))))] | |
108 | 113 | else throw("Invalid Amount Fee Payment.") | |
109 | 114 | else throw(("Invalid Amount. Try " + toString(getIntegerValue(((getValidPair(asset1, asset2) + toBase58String(i.caller.bytes)) + "_received"))))) | |
110 | 115 | else throw("Invalid payment asset. Use the first asset of the pair") | |
111 | 116 | else throw("You do not have a Guaranteed swap for this pair. Create a new Swap.") | |
112 | 117 | else throw("Invalid Pair.") | |
113 | 118 | ||
114 | 119 | ||
115 | 120 | ||
116 | 121 | @Callable(i) | |
117 | 122 | func depositOracle (assetValue,assetPrice,price) = { | |
118 | 123 | let oracleAddress = match getString("oracle") { | |
119 | 124 | case ix: String => | |
120 | 125 | ix | |
121 | 126 | case _ => | |
122 | 127 | throw("Oracle is not defined. Please contact the admin.") | |
123 | 128 | } | |
124 | 129 | let n = checkAssetId(i.payments[0].assetId) | |
125 | 130 | let a = match getInteger(((((assetValue + "_") + assetPrice) + "_") + n)) { | |
126 | 131 | case ix: Int => | |
127 | 132 | ix | |
128 | 133 | case _ => | |
129 | 134 | 0 | |
130 | 135 | } | |
131 | 136 | let nn = match getInteger((((assetValue + "_") + assetPrice) + "_total")) { | |
132 | 137 | case xx: Int => | |
133 | 138 | (xx + i.payments[0].amount) | |
134 | 139 | case _ => | |
135 | 140 | i.payments[0].amount | |
136 | 141 | } | |
137 | 142 | if ((toBase58String(i.caller.bytes) == oracleAddress)) | |
138 | 143 | then [IntegerEntry(((((assetValue + "_") + assetPrice) + "_") + n), (a + i.payments[0].amount)), IntegerEntry((((assetValue + "_") + assetPrice) + "_price"), price), BooleanEntry(((assetValue + "_") + assetPrice), true), StringEntry((((assetValue + "_") + assetPrice) + "_asset1"), assetValue), StringEntry((((assetValue + "_") + assetPrice) + "_asset2"), assetPrice), IntegerEntry((((assetValue + "_") + assetPrice) + "_total"), nn)] | |
139 | 144 | else throw(adminmsg) | |
140 | 145 | } | |
141 | 146 | ||
142 | 147 | ||
143 | 148 | @Verifier(tx) | |
144 | 149 | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
145 | 150 |
github/deemru/w8io/169f3d6 59.04 ms ◑