tx · GU81paK1cdD7p1YW2CXbEWYjbM8jo3Bnkbovh3MYtJst 3N9cKCHp6ZLMgz7rRgF8Q8DEt8zbtd1Ht7F: -0.01100000 Waves 2023.02.15 14:59 [2450700] smart account 3N9cKCHp6ZLMgz7rRgF8Q8DEt8zbtd1Ht7F > SELF 0.00000000 Waves
{ "type": 13, "id": "GU81paK1cdD7p1YW2CXbEWYjbM8jo3Bnkbovh3MYtJst", "fee": 1100000, "feeAssetId": null, "timestamp": 1676462463427, "version": 2, "chainId": 84, "sender": "3N9cKCHp6ZLMgz7rRgF8Q8DEt8zbtd1Ht7F", "senderPublicKey": "3V22YUj3GF4AeBxdWx8rgGdG4groE4W6P2s4sAkshe7R", "proofs": [ "5hJmVeSM5j53goZ2GjFgMJ3Makfd1YEHMFvM61kwJ7pmj4vCu6fNReNbosPkZ51hjEZeFYrE1DXUMbV1WXWPiJb1" ], "script": "base64:BgJHCAISCwoJCAgICAgBCAgIEgQKAggIEgQKAggIEgMKAQgSBgoECAgIARIGCgQICAgIEgQKAggIEgQKAggCEgQKAggIEgMKAQgLAAlzZXBhcmF0b3ICAV8ABGtCdXkCA2J1eQAGa1ByaWNlAgVwcmljZQAFa1NlbGwCBHNlbGwAEm1heEF1Y3Rpb25EdXJhdGlvbgAeAAV0ZWFtcwEghWOVo/OIjrDeDBeOCE6/mj+SuybbOuh2jhbcFCIqSH4ABVdBVkVTAQAABGtCaWQCA2JpZAAMc3RhdHVzRm9yTkZUCQCWCgQCBE9QRU4CBkNMT1NFRAIIUkVXQVJERUQCCENBTkNFTEVEAAtkQXBwQWRkcmVzcwEaAVRKuE9s3sLak+30julKNvjVT3+V1VVbXaABBWlzTmZ0AQdhc3NldElkBAckbWF0Y2gwCQDsBwEFB2Fzc2V0SWQDCQABAgUHJG1hdGNoMAIFQXNzZXQEBXRva2VuBQckbWF0Y2gwAwMJAAACCAUFdG9rZW4IZGVjaW1hbHMAAAkAAAIIBQV0b2tlbghxdWFudGl0eQABBwkAAAIIBQV0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hpZ2hlc3RfYmlkAgEwBQNuaWwAbmN4zQ==", "height": 2450700, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 4PYxBVFwY6EBA8e9MjKZ7TmTdout3P7iyL4wFKeJ58Wh Next: D8FXfyig7hiEvSuauDy2dZv7nfPi8QDNezQNcWbzyfBV Diff:
Old | New | Differences | |
---|---|---|---|
97 | 97 | ||
98 | 98 | ||
99 | 99 | @Callable(o) | |
100 | - | func addAuction (P,Q,R,S | |
100 | + | func addAuction (P,Q,R,S) = { | |
101 | 101 | let A = toBase58String(o.transactionId) | |
102 | 102 | let O = value(o.payments[0].assetId) | |
103 | 103 | let B = value(R) | |
126 | 126 | ||
127 | 127 | ||
128 | 128 | @Callable(o) | |
129 | - | func placeBid (W,O,q,X | |
129 | + | func placeBid (W,O,q,X) = { | |
130 | 130 | let A = toBase58String(o.transactionId) | |
131 | 131 | let U = o.caller.bytes | |
132 | 132 | let l = fromBase58String(O) | |
133 | - | let | |
134 | - | let | |
135 | - | let | |
136 | - | let | |
137 | - | let | |
138 | - | let | |
133 | + | let Y = o.payments[0].assetId | |
134 | + | let Z = o.payments[0].amount | |
135 | + | let aa = getStringValue(this, (W + "_highest_bid")) | |
136 | + | let ab = getString(this, (W + "_previous_bidder")) | |
137 | + | let ac = getStringValue(this, (W + "_bidder_count")) | |
138 | + | let ad = getStringValue(this, (W + "_winner_of_nft")) | |
139 | 139 | let V = getStringValue(this, (W + "_nft_status")) | |
140 | 140 | if ((V != "OPEN")) | |
141 | 141 | then throw("Not open for auction") | |
142 | - | else if ((parseIntValue( | |
142 | + | else if ((parseIntValue(aa) >= Z)) | |
143 | 143 | then throw("Bid is less then starting/highest Bid") | |
144 | - | else if (( | |
145 | - | then [StringEntry((W + "_highest_bid"), toString( | |
146 | - | else if (( | |
147 | - | then [ScriptTransfer(Address(fromBase58String( | |
144 | + | else if ((aa == "0")) | |
145 | + | then [StringEntry((W + "_highest_bid"), toString(Z)), StringEntry((W + "_winner_of_nft"), toBase58String(o.caller.bytes)), StringEntry((W + "_bidder_count"), toString((parseIntValue(ac) + 1))), StringEntry((W + "_nft_id"), toBase58String(l)), StringEntry((W + "_nft_owner"), q), StringEntry((((A + "_") + W) + "_highest_bid"), toString(Z)), StringEntry((((A + "_") + W) + "_winner"), toBase58String(o.caller.bytes)), StringEntry((((A + "_") + W) + "_bidder_count"), toString((parseIntValue(ac) + 1))), StringEntry((((A + "_") + W) + "_nft_id"), toBase58String(l)), StringEntry((((A + "_") + W) + "_nft_owner"), q), StringEntry((A + "_bid_for_nft_by"), toBase58String(U)), StringEntry((A + "_bid_price_place"), X), StringEntry((A + "_previous_bid_amount_refund_to_address"), ad), StringEntry((A + "_prevoius_bid_amount_refund"), aa)] | |
146 | + | else if ((aa != "0")) | |
147 | + | then [ScriptTransfer(Address(fromBase58String(ad)), parseIntValue(aa), Y), StringEntry((A + "_previous_bid_amount_refund_to_address"), ad), StringEntry((A + "_prevoius_bid_amount_refund"), aa), StringEntry((W + "_bidder_count"), toString((parseIntValue(ac) + 1))), StringEntry((W + "_highest_bid"), toString(Z)), StringEntry((W + "_winner_of_nft"), toBase58String(o.caller.bytes)), StringEntry((W + "_nft_id"), toBase58String(l)), StringEntry((W + "_nft_owner"), q), StringEntry((((A + "_") + W) + "_highest_bid"), toString(Z)), StringEntry((((A + "_") + W) + "_winner"), toBase58String(o.caller.bytes)), StringEntry((((A + "_") + W) + "_bidder_count"), toString((parseIntValue(ac) + 1))), StringEntry((((A + "_") + W) + "_nft_id"), toBase58String(l)), StringEntry((((A + "_") + W) + "_nft_owner"), q), StringEntry((A + "_bid_for_nft_by"), toBase58String(U)), StringEntry((A + "_bid_price_place"), X)] | |
148 | 148 | else nil | |
149 | 149 | } | |
150 | 150 | ||
154 | 154 | func acceptBidOffer (W,O) = { | |
155 | 155 | let A = toBase58String(o.transactionId) | |
156 | 156 | let U = o.caller.bytes | |
157 | - | let | |
158 | - | let | |
159 | - | let | |
160 | - | let | |
161 | - | let N = ((parseIntValue( | |
162 | - | let | |
163 | - | [ScriptTransfer(Address(U), | |
157 | + | let Y = o.payments[0].assetId | |
158 | + | let ae = fromBase58String(O) | |
159 | + | let af = getStringValue(this, (W + "_highest_bid")) | |
160 | + | let ag = ((parseIntValue(af) / 1000) * 975) | |
161 | + | let N = ((parseIntValue(af) / 1000) * 25) | |
162 | + | let ah = getStringValue(this, (W + "_winner_of_nft")) | |
163 | + | [ScriptTransfer(Address(U), ag, Y), ScriptTransfer(Address(fromBase58String(ah)), 1, ae), StringEntry("platform_fee", toString(N)), StringEntry((A + "_amount_paid_to_owner"), af), StringEntry((A + "_nft_transfer_to"), ah), StringEntry((A + "_nft_status"), "REWARDED"), StringEntry((W + "_amount_paid_to_owner"), af), StringEntry((W + "_nft_transfer_to"), ah), StringEntry((W + "_nft_status"), "REWARDED")] | |
164 | 164 | } | |
165 | 165 | ||
166 | 166 | ||
167 | 167 | ||
168 | 168 | @Callable(o) | |
169 | - | func cancelAuction (W, | |
169 | + | func cancelAuction (W,ai) = { | |
170 | 170 | let A = toBase58String(o.transactionId) | |
171 | 171 | let U = o.caller.bytes | |
172 | 172 | let aj = getStringValue(this, (W + "_nft_status")) |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = "_" | |
5 | 5 | ||
6 | 6 | let b = "buy" | |
7 | 7 | ||
8 | 8 | let c = "price" | |
9 | 9 | ||
10 | 10 | let d = "sell" | |
11 | 11 | ||
12 | 12 | let e = 30 | |
13 | 13 | ||
14 | 14 | let f = base58'9yhJDfWjPpv6tFjWRD1AJyBQwausJf2ZdxzLn86Uknnq' | |
15 | 15 | ||
16 | 16 | let g = base58'' | |
17 | 17 | ||
18 | 18 | let h = "bid" | |
19 | 19 | ||
20 | 20 | let i = $Tuple4("OPEN", "CLOSED", "REWARDED", "CANCELED") | |
21 | 21 | ||
22 | 22 | let j = base58'3MvjAaDYHpS4A5K4CV3kZMMEH9m9JdBSvbq' | |
23 | 23 | ||
24 | 24 | func k (l) = { | |
25 | 25 | let m = assetInfo(l) | |
26 | 26 | if ($isInstanceOf(m, "Asset")) | |
27 | 27 | then { | |
28 | 28 | let n = m | |
29 | 29 | if (if ((n.decimals == 0)) | |
30 | 30 | then (n.quantity == 1) | |
31 | 31 | else false) | |
32 | 32 | then (n.reissuable == false) | |
33 | 33 | else false | |
34 | 34 | } | |
35 | 35 | else false | |
36 | 36 | } | |
37 | 37 | ||
38 | 38 | ||
39 | 39 | @Callable(o) | |
40 | 40 | func createNft (p,q,r,s,t,u,v,w,x) = { | |
41 | 41 | let y = Issue(p, v, 1, 0, false) | |
42 | 42 | let z = calculateAssetId(y) | |
43 | 43 | let A = o.transactionId | |
44 | 44 | [y, ScriptTransfer(o.caller, 1, z), StringEntry(((toBase58String(z) + a) + "Owner"), toString(o.caller)), StringEntry(((toBase58String(z) + a) + "nft_type"), s), StringEntry(((toBase58String(z) + a) + "nft_tags"), t), StringEntry(((toBase58String(z) + a) + "nft_dAppAddress"), r), IntegerEntry(((toBase58String(z) + a) + "nft_selling_price"), u), StringEntry(((toBase58String(z) + a) + "nft_onSell"), w), StringEntry(((toBase58String(z) + a) + "nft_data"), x), StringEntry(((toBase58String(A) + a) + "issue_nft"), toBase58String(z))] | |
45 | 45 | } | |
46 | 46 | ||
47 | 47 | ||
48 | 48 | ||
49 | 49 | @Callable(o) | |
50 | 50 | func sellNFT (B,C) = { | |
51 | 51 | let A = o.transactionId | |
52 | 52 | let D = o.caller.bytes | |
53 | 53 | let E = $Tuple2(value(o.payments[0].assetId), value(o.payments[0].amount)) | |
54 | 54 | let F = E._1 | |
55 | 55 | let G = E._2 | |
56 | 56 | if (!(k(F))) | |
57 | 57 | then throw("Token is not NFT") | |
58 | 58 | else [StringEntry(((c + a) + toBase58String(value(o.payments[0].assetId))), B), StringEntry(((toString(o.caller) + a) + d), (((toBase58String(F) + a) + toString(G)) + C))] | |
59 | 59 | } | |
60 | 60 | ||
61 | 61 | ||
62 | 62 | ||
63 | 63 | @Callable(o) | |
64 | 64 | func buyNFT (H,I) = { | |
65 | 65 | let l = fromBase58String(H) | |
66 | 66 | let J = value(o.payments[0].amount) | |
67 | 67 | let K = { | |
68 | 68 | let m = getString(this, (("nft_" + I) + "_owner")) | |
69 | 69 | if ($isInstanceOf(m, "String")) | |
70 | 70 | then { | |
71 | 71 | let L = m | |
72 | 72 | L | |
73 | 73 | } | |
74 | 74 | else false | |
75 | 75 | } | |
76 | 76 | let B = getStringValue(((((c + a) + H) + "_") + I)) | |
77 | 77 | let M = ((J / 1000) * 975) | |
78 | 78 | let N = ((J / 1000) * 25) | |
79 | 79 | if ((I == toString(o.caller))) | |
80 | 80 | then throw("current Owner of NFT not able to purchase") | |
81 | 81 | else if ((o.payments[0].assetId == f)) | |
82 | 82 | then [ScriptTransfer(o.caller, 1, l), ScriptTransfer(Address(fromBase58String(I)), M, f), StringEntry((("nft_" + H) + "platform_fee"), toString(N)), StringEntry(((toString(o.caller) + a) + b), ((H + a) + toString(J))), DeleteEntry((("nft_" + I) + "_owner")), StringEntry((("nft_" + I) + "_owner"), toString(o.caller)), StringEntry(((H + a) + "_owner"), toString(o.caller))] | |
83 | 83 | else if ((o.payments[0].assetId == unit)) | |
84 | 84 | then [ScriptTransfer(o.caller, 1, l), ScriptTransfer(Address(fromBase58String(I)), M, unit), StringEntry((("nft_" + H) + "platform_fee"), toString(N)), StringEntry(((toString(o.caller) + a) + b), ((H + a) + toString(J))), DeleteEntry((("nft_" + I) + "_owner")), StringEntry((("nft_" + I) + "_owner"), toString(o.caller)), StringEntry(((H + a) + "_owner"), toString(o.caller))] | |
85 | 85 | else nil | |
86 | 86 | } | |
87 | 87 | ||
88 | 88 | ||
89 | 89 | ||
90 | 90 | @Callable(o) | |
91 | 91 | func cancelSell (O) = { | |
92 | 92 | let A = toBase58String(o.transactionId) | |
93 | 93 | let D = o.caller.bytes | |
94 | 94 | [StringEntry(((A + O) + "_nft_status"), "CANCELED"), ScriptTransfer(Address(D), 1, fromBase58String(O))] | |
95 | 95 | } | |
96 | 96 | ||
97 | 97 | ||
98 | 98 | ||
99 | 99 | @Callable(o) | |
100 | - | func addAuction (P,Q,R,S | |
100 | + | func addAuction (P,Q,R,S) = { | |
101 | 101 | let A = toBase58String(o.transactionId) | |
102 | 102 | let O = value(o.payments[0].assetId) | |
103 | 103 | let B = value(R) | |
104 | 104 | let T = (lastBlock.height + S) | |
105 | 105 | let U = o.caller.bytes | |
106 | 106 | let V = { | |
107 | 107 | let m = getString(this, (((toBase58String(O) + a) + "nft_status_") + toBase58String(U))) | |
108 | 108 | if ($isInstanceOf(m, "String")) | |
109 | 109 | then { | |
110 | 110 | let L = m | |
111 | 111 | true | |
112 | 112 | } | |
113 | 113 | else false | |
114 | 114 | } | |
115 | 115 | if ((V == true)) | |
116 | 116 | then throw("Already in auction list") | |
117 | 117 | else if ((S > e)) | |
118 | 118 | then throw(("Duration is too long. Must be less than or equal to 7 " + toString(e))) | |
119 | 119 | else if ((o.payments[0].assetId == unit)) | |
120 | 120 | then throw("NFT not attached") | |
121 | 121 | else if ((o.payments[0].assetId == f)) | |
122 | 122 | then throw("NFT not attached") | |
123 | 123 | else [StringEntry(((A + "nft_start_auction_date") + toBase58String(U)), P), StringEntry(((A + "nft_end_auction_date") + toBase58String(U)), Q), StringEntry((A + "_nft_start_price"), R), StringEntry((A + "_nft_owner"), toString(o.caller)), StringEntry((A + "_nft_on_auction"), toBase58String(O)), StringEntry((A + "_previous_bidder"), "none"), StringEntry((A + "_highest_bid"), "0"), StringEntry((A + "_winner_of_nft"), "0"), StringEntry((A + "_bidder_count"), "0"), StringEntry((A + "_nft_status"), "OPEN")] | |
124 | 124 | } | |
125 | 125 | ||
126 | 126 | ||
127 | 127 | ||
128 | 128 | @Callable(o) | |
129 | - | func placeBid (W,O,q,X | |
129 | + | func placeBid (W,O,q,X) = { | |
130 | 130 | let A = toBase58String(o.transactionId) | |
131 | 131 | let U = o.caller.bytes | |
132 | 132 | let l = fromBase58String(O) | |
133 | - | let | |
134 | - | let | |
135 | - | let | |
136 | - | let | |
137 | - | let | |
138 | - | let | |
133 | + | let Y = o.payments[0].assetId | |
134 | + | let Z = o.payments[0].amount | |
135 | + | let aa = getStringValue(this, (W + "_highest_bid")) | |
136 | + | let ab = getString(this, (W + "_previous_bidder")) | |
137 | + | let ac = getStringValue(this, (W + "_bidder_count")) | |
138 | + | let ad = getStringValue(this, (W + "_winner_of_nft")) | |
139 | 139 | let V = getStringValue(this, (W + "_nft_status")) | |
140 | 140 | if ((V != "OPEN")) | |
141 | 141 | then throw("Not open for auction") | |
142 | - | else if ((parseIntValue( | |
142 | + | else if ((parseIntValue(aa) >= Z)) | |
143 | 143 | then throw("Bid is less then starting/highest Bid") | |
144 | - | else if (( | |
145 | - | then [StringEntry((W + "_highest_bid"), toString( | |
146 | - | else if (( | |
147 | - | then [ScriptTransfer(Address(fromBase58String( | |
144 | + | else if ((aa == "0")) | |
145 | + | then [StringEntry((W + "_highest_bid"), toString(Z)), StringEntry((W + "_winner_of_nft"), toBase58String(o.caller.bytes)), StringEntry((W + "_bidder_count"), toString((parseIntValue(ac) + 1))), StringEntry((W + "_nft_id"), toBase58String(l)), StringEntry((W + "_nft_owner"), q), StringEntry((((A + "_") + W) + "_highest_bid"), toString(Z)), StringEntry((((A + "_") + W) + "_winner"), toBase58String(o.caller.bytes)), StringEntry((((A + "_") + W) + "_bidder_count"), toString((parseIntValue(ac) + 1))), StringEntry((((A + "_") + W) + "_nft_id"), toBase58String(l)), StringEntry((((A + "_") + W) + "_nft_owner"), q), StringEntry((A + "_bid_for_nft_by"), toBase58String(U)), StringEntry((A + "_bid_price_place"), X), StringEntry((A + "_previous_bid_amount_refund_to_address"), ad), StringEntry((A + "_prevoius_bid_amount_refund"), aa)] | |
146 | + | else if ((aa != "0")) | |
147 | + | then [ScriptTransfer(Address(fromBase58String(ad)), parseIntValue(aa), Y), StringEntry((A + "_previous_bid_amount_refund_to_address"), ad), StringEntry((A + "_prevoius_bid_amount_refund"), aa), StringEntry((W + "_bidder_count"), toString((parseIntValue(ac) + 1))), StringEntry((W + "_highest_bid"), toString(Z)), StringEntry((W + "_winner_of_nft"), toBase58String(o.caller.bytes)), StringEntry((W + "_nft_id"), toBase58String(l)), StringEntry((W + "_nft_owner"), q), StringEntry((((A + "_") + W) + "_highest_bid"), toString(Z)), StringEntry((((A + "_") + W) + "_winner"), toBase58String(o.caller.bytes)), StringEntry((((A + "_") + W) + "_bidder_count"), toString((parseIntValue(ac) + 1))), StringEntry((((A + "_") + W) + "_nft_id"), toBase58String(l)), StringEntry((((A + "_") + W) + "_nft_owner"), q), StringEntry((A + "_bid_for_nft_by"), toBase58String(U)), StringEntry((A + "_bid_price_place"), X)] | |
148 | 148 | else nil | |
149 | 149 | } | |
150 | 150 | ||
151 | 151 | ||
152 | 152 | ||
153 | 153 | @Callable(o) | |
154 | 154 | func acceptBidOffer (W,O) = { | |
155 | 155 | let A = toBase58String(o.transactionId) | |
156 | 156 | let U = o.caller.bytes | |
157 | - | let | |
158 | - | let | |
159 | - | let | |
160 | - | let | |
161 | - | let N = ((parseIntValue( | |
162 | - | let | |
163 | - | [ScriptTransfer(Address(U), | |
157 | + | let Y = o.payments[0].assetId | |
158 | + | let ae = fromBase58String(O) | |
159 | + | let af = getStringValue(this, (W + "_highest_bid")) | |
160 | + | let ag = ((parseIntValue(af) / 1000) * 975) | |
161 | + | let N = ((parseIntValue(af) / 1000) * 25) | |
162 | + | let ah = getStringValue(this, (W + "_winner_of_nft")) | |
163 | + | [ScriptTransfer(Address(U), ag, Y), ScriptTransfer(Address(fromBase58String(ah)), 1, ae), StringEntry("platform_fee", toString(N)), StringEntry((A + "_amount_paid_to_owner"), af), StringEntry((A + "_nft_transfer_to"), ah), StringEntry((A + "_nft_status"), "REWARDED"), StringEntry((W + "_amount_paid_to_owner"), af), StringEntry((W + "_nft_transfer_to"), ah), StringEntry((W + "_nft_status"), "REWARDED")] | |
164 | 164 | } | |
165 | 165 | ||
166 | 166 | ||
167 | 167 | ||
168 | 168 | @Callable(o) | |
169 | - | func cancelAuction (W, | |
169 | + | func cancelAuction (W,ai) = { | |
170 | 170 | let A = toBase58String(o.transactionId) | |
171 | 171 | let U = o.caller.bytes | |
172 | 172 | let aj = getStringValue(this, (W + "_nft_status")) | |
173 | 173 | let ak = getStringValue(this, (W + "_winner_of_nft")) | |
174 | 174 | let al = getStringValue(this, (W + "_nft_owner")) | |
175 | 175 | let O = getStringValue(this, (W + "_nft_on_auction")) | |
176 | 176 | let am = getStringValue(this, (W + "_highest_bid")) | |
177 | 177 | if ((ak == "0")) | |
178 | 178 | then [StringEntry(((A + W) + "_nft_status"), "CANCELED"), ScriptTransfer(Address(fromBase58String(al)), 1, fromBase58String(O))] | |
179 | 179 | else if ((ak != "0")) | |
180 | 180 | then throw("soory you can't cancel it because already auction placed by someone") | |
181 | 181 | else nil | |
182 | 182 | } | |
183 | 183 | ||
184 | 184 | ||
185 | 185 | ||
186 | 186 | @Callable(o) | |
187 | 187 | func manualFundTransfer (an,ao) = { | |
188 | 188 | let U = o.caller.bytes | |
189 | 189 | let ap = fromBase58String(an) | |
190 | 190 | let J = o.payments[0].amount | |
191 | 191 | let aq = ((J / 1000) * 975) | |
192 | 192 | let N = ((J / 1000) * 25) | |
193 | 193 | if ((o.payments[0].assetId == unit)) | |
194 | 194 | then [IntegerEntry((toBase58String(U) + "_transfer"), J), StringEntry("platform_fee", toString(N)), StringEntry((toBase58String(U) + "_transfer_to"), an), ScriptTransfer(Address(ap), aq, unit)] | |
195 | 195 | else if ((o.payments[0].assetId == f)) | |
196 | 196 | then [IntegerEntry((toBase58String(U) + "_transfer"), J), StringEntry("platform_fee", toString(N)), StringEntry((toBase58String(U) + "_transfer_to"), an), ScriptTransfer(Address(ap), aq, f)] | |
197 | 197 | else nil | |
198 | 198 | } | |
199 | 199 | ||
200 | 200 | ||
201 | 201 | ||
202 | 202 | @Callable(o) | |
203 | 203 | func testBid (ar) = [StringEntry("E8kkFBYCy44JJaq6pAZ6KizsuResi5UKNhbD1WNZwhhY_highest_bid", "0")] | |
204 | 204 | ||
205 | 205 |
github/deemru/w8io/026f985 69.41 ms ◑