tx · 7Nr11duY6psLb5GBSfYKBoLjccSAxT5cZDyBnJ2YPfKC 3MrmQcYkqD2NWZCPBPxJh9ecDeCSHJaGvTX: -0.01400000 Waves 2020.10.22 14:50 [1231743] smart account 3MrmQcYkqD2NWZCPBPxJh9ecDeCSHJaGvTX > SELF 0.00000000 Waves
{ "type": 13, "id": "7Nr11duY6psLb5GBSfYKBoLjccSAxT5cZDyBnJ2YPfKC", "fee": 1400000, "feeAssetId": null, "timestamp": 1603367477032, "version": 1, "sender": "3MrmQcYkqD2NWZCPBPxJh9ecDeCSHJaGvTX", "senderPublicKey": "3jFYpyJ6e4HkngCSjP4y8XmWbp72HQExbfLDVKd4wZrr", "proofs": [ "2ZJmYxVRqy5yiTiidttWwfmLuVC7G4NrsjUqWo8X5HEDzYrtNi7tx1L35QBkiRawpVksG1rJ9TrE1t2PiJ2PjPcx" ], "script": "base64:AAIEAAAAAAAAAA0IAhIAEgASABIDCgEBAAAADgAAAAAISWRUb2tlbkEJAQAAABFAZXh0ck5hdGl2ZSgxMDUzKQAAAAIFAAAABHRoaXMCAAAADWFzc2V0SWRUb2tlbkEAAAAACElkVG9rZW5CCQEAAAARQGV4dHJOYXRpdmUoMTA1MykAAAACBQAAAAR0aGlzAgAAAA1hc3NldElkVG9rZW5CAAAAAAxhbW91bnRUb2tlbkIJAQAAABFAZXh0ck5hdGl2ZSgxMDUwKQAAAAIFAAAABHRoaXMCAAAADGFtb3VudFRva2VuQgAAAAAMYW1vdW50VG9rZW5BCQEAAAARQGV4dHJOYXRpdmUoMTA1MCkAAAACBQAAAAR0aGlzAgAAAAxhbW91bnRUb2tlbkEAAAAAEWFzc2V0SWRUb2tlblNoYXJlCQEAAAARQGV4dHJOYXRpdmUoMTA1MikAAAACBQAAAAR0aGlzAgAAAA5zaGFyZV90b2tlbl9pZAAAAAAQdG9rZW5TaGFyZVN1cHBseQkBAAAAEUBleHRyTmF0aXZlKDEwNTApAAAAAgUAAAAEdGhpcwIAAAASc2hhcmVfdG9r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AAAAAgUAAAASdG9rZW5SZWNlaXZlQW1vdW50BQAAAAxhbW91bnRUb2tlbkEJAABlAAAAAgUAAAAXY29taXNzaW9uU2NhbGVEZWxpbWl0ZXIFAAAACWNvbWlzc2lvbgUAAAAXY29taXNzaW9uU2NhbGVEZWxpbWl0ZXIDCQAAZgAAAAIFAAAAD21pblRva2VuUmVjaWV2ZQUAAAAPdG9rZW5TZW5kQW1vdW50CQAAAgAAAAECAAAAWVByaWNlIGhhcyBjaGFuZ2VkIGRyYW1hdGljYWx5LiBSZWNlaXZpbmcgdG9rZW4gYW1vdW50IGRvbid0IHNhdGlzZnkgc3BlY2lmaWVkIHByaWNlIGxldmVsBAAAAAthc3NldElkU2VudAUAAAANYXNzZXRJZFRva2VuQgkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgIAAAAMYW1vdW50VG9rZW5BCQAAZAAAAAIFAAAADGFtb3VudFRva2VuQQUAAAASdG9rZW5SZWNlaXZlQW1vdW50CQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACAgAAAAxhbW91bnRUb2tlbkIJAABlAAAAAgUAAAAMYW1vdW50VG9rZW5CBQAAAA90b2tlblNlbmRBbW91bnQJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAICAAAADmV4Y2hhbmdlX2NvdW50CQAAZAAAAAIFAAAABWNvdW50AAAAAAAAAAABCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMIBQAAAApjb250ZXh0T2JqAAAABmNhbGxlcgUAAAAPdG9rZW5TZW5kQW1vdW50BQAAAAthc3NldElkU2VudAUAAAADbmlsCQAAAgAAAAECAAAAFEFzc2V0IGlzIG5vdCBhbGxvd2VkAAAAAJfIOD4=", "chainId": 84, "height": 1231743, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: GzJUjiJvsf2WtTboTMtANKeQ32xedqNxCkuVaXb26m9Q Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 4 #-} | |
2 | + | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | + | {-# CONTENT_TYPE DAPP #-} | |
4 | + | let IdTokenA = getStringValue(this, "assetIdTokenA") | |
5 | + | ||
6 | + | let IdTokenB = getStringValue(this, "assetIdTokenB") | |
7 | + | ||
8 | + | let amountTokenB = getIntegerValue(this, "amountTokenB") | |
9 | + | ||
10 | + | let amountTokenA = getIntegerValue(this, "amountTokenA") | |
11 | + | ||
12 | + | let assetIdTokenShare = getBinaryValue(this, "share_token_id") | |
13 | + | ||
14 | + | let tokenShareSupply = getIntegerValue(this, "share_token_supply") | |
15 | + | ||
16 | + | let comission = 2000 | |
17 | + | ||
18 | + | let comissionScaleDelimiter = 10000 | |
19 | + | ||
20 | + | let version = "0.0.2" | |
21 | + | ||
22 | + | let scaleValue8 = 100000000 | |
23 | + | ||
24 | + | let scaleValue8Digits = 8 | |
25 | + | ||
26 | + | func assetId (asset) = if ((asset == "WAVES")) | |
27 | + | then unit | |
28 | + | else fromBase58String(asset) | |
29 | + | ||
30 | + | ||
31 | + | let assetIdTokenA = assetId(IdTokenA) | |
32 | + | ||
33 | + | let assetIdTokenB = assetId(IdTokenB) | |
34 | + | ||
35 | + | @Callable(contextObj) | |
36 | + | func fund () = { | |
37 | + | let paymentA = value(contextObj.payments[0]) | |
38 | + | let paymentB = value(contextObj.payments[1]) | |
39 | + | let assetIdReceivedA = paymentA.assetId | |
40 | + | let tokenReceiveAmountA = paymentA.amount | |
41 | + | let assetIdReceivedB = paymentB.assetId | |
42 | + | let tokenReceiveAmountB = paymentB.amount | |
43 | + | let digitTokenA = match assetIdReceivedA { | |
44 | + | case p: Unit => | |
45 | + | 8 | |
46 | + | case p: ByteVector => | |
47 | + | value(assetInfo(p)).decimals | |
48 | + | case _ => | |
49 | + | throw("Match error") | |
50 | + | } | |
51 | + | let digitTokenB = match assetIdReceivedB { | |
52 | + | case p: Unit => | |
53 | + | 8 | |
54 | + | case p: ByteVector => | |
55 | + | value(assetInfo(p)).decimals | |
56 | + | case _ => | |
57 | + | throw("Match error") | |
58 | + | } | |
59 | + | if (isDefined(getBoolean(this, "status"))) | |
60 | + | then throw("already active") | |
61 | + | else { | |
62 | + | let shareTokenName = ("ShareT_" + takeRight(toString(this), 5)) | |
63 | + | let digitsInShareToken = ((digitTokenA + digitTokenB) / 2) | |
64 | + | let shareTokenInitialAmount = fraction(pow(tokenReceiveAmountA, digitTokenA, 5, 1, digitTokenA, HALFDOWN), pow(tokenReceiveAmountB, digitTokenB, 5, 1, digitTokenB, HALFDOWN), pow(10, 0, digitsInShareToken, 0, 0, HALFDOWN)) | |
65 | + | let shareTokenAssetId = calculateAssetId(Issue(shareTokenName, shareTokenName, shareTokenInitialAmount, digitsInShareToken, true)) | |
66 | + | let assetIdTokenStringA = match assetIdReceivedA { | |
67 | + | case t: Unit => | |
68 | + | "WAVES" | |
69 | + | case t: ByteVector => | |
70 | + | toBase58String(value(assetIdReceivedA)) | |
71 | + | case _ => | |
72 | + | throw("Match error") | |
73 | + | } | |
74 | + | let assetIdTokenStringB = match assetIdReceivedB { | |
75 | + | case t: Unit => | |
76 | + | "WAVES" | |
77 | + | case t: ByteVector => | |
78 | + | toBase58String(value(assetIdReceivedB)) | |
79 | + | case _ => | |
80 | + | throw("Match error") | |
81 | + | } | |
82 | + | [IntegerEntry("amountTokenA", tokenReceiveAmountA), IntegerEntry("amountTokenB", tokenReceiveAmountB), StringEntry("assetIdTokenA", assetIdTokenStringA), StringEntry("assetIdTokenB", assetIdTokenStringB), IntegerEntry("exchange_count", 0), BooleanEntry("status", true), IntegerEntry("comission", comission), IntegerEntry("comissionScaleDelimiter", comissionScaleDelimiter), StringEntry("version", version), Issue(shareTokenName, shareTokenName, shareTokenInitialAmount, 8, true), ScriptTransfer(contextObj.caller, shareTokenInitialAmount, shareTokenAssetId), BinaryEntry("share_token_id", shareTokenAssetId), IntegerEntry("share_token_supply", shareTokenInitialAmount)] | |
83 | + | } | |
84 | + | } | |
85 | + | ||
86 | + | ||
87 | + | ||
88 | + | @Callable(contextObj) | |
89 | + | func replenishment () = { | |
90 | + | let paymentA = value(contextObj.payments[0]) | |
91 | + | let paymentB = value(contextObj.payments[1]) | |
92 | + | let assetIdReceivedA = paymentA.assetId | |
93 | + | let tokenReceiveAmountA = paymentA.amount | |
94 | + | let assetIdReceivedB = paymentB.assetId | |
95 | + | let tokenReceiveAmountB = paymentB.amount | |
96 | + | let dAppTokensAmountA = getIntegerValue(this, "amountTokenA") | |
97 | + | let dAppTokensAmountB = getIntegerValue(this, "amountTokenB") | |
98 | + | if (if ((assetIdReceivedA != assetIdTokenA)) | |
99 | + | then true | |
100 | + | else (assetIdReceivedB != assetIdTokenB)) | |
101 | + | then throw("incorrect assets") | |
102 | + | else { | |
103 | + | let tokenRatio = (fraction(tokenReceiveAmountA, (1000000000000 * 100000), dAppTokensAmountA) / fraction(dAppTokensAmountB, 1000000000000, tokenReceiveAmountB)) | |
104 | + | if (!(if ((tokenRatio > 99990)) | |
105 | + | then (100010 > tokenRatio) | |
106 | + | else false)) | |
107 | + | then throw("incorrect assets amount") | |
108 | + | else { | |
109 | + | let shareTokenToPayAmount = fraction(tokenReceiveAmountA, tokenShareSupply, dAppTokensAmountA) | |
110 | + | if ((shareTokenToPayAmount == 0)) | |
111 | + | then throw("you try replansish with very small amount") | |
112 | + | else [Reissue(assetIdTokenShare, shareTokenToPayAmount, true), ScriptTransfer(contextObj.caller, shareTokenToPayAmount, assetIdTokenShare), IntegerEntry("share_token_supply", (tokenShareSupply + shareTokenToPayAmount)), IntegerEntry("amountTokenA", (dAppTokensAmountA + tokenReceiveAmountA)), IntegerEntry("amountTokenB", (dAppTokensAmountB + tokenReceiveAmountB))] | |
113 | + | } | |
114 | + | } | |
115 | + | } | |
116 | + | ||
117 | + | ||
118 | + | ||
119 | + | @Callable(contextObj) | |
120 | + | func withdraw () = { | |
121 | + | let dAppTokensAmountA = getIntegerValue(this, "amountTokenA") | |
122 | + | let dAppTokensAmountB = getIntegerValue(this, "amountTokenB") | |
123 | + | let payment = value(contextObj.payments[0]) | |
124 | + | let assetIdReceived = payment.assetId | |
125 | + | let tokenReceiveAmount = payment.amount | |
126 | + | if ((assetIdTokenShare != assetIdReceived)) | |
127 | + | then throw(("you need to attach share token for this dApp " + toBase58String(assetIdTokenShare))) | |
128 | + | else { | |
129 | + | let tokensToPayA = fraction(tokenReceiveAmount, dAppTokensAmountA, tokenShareSupply) | |
130 | + | let tokensToPayB = fraction(tokenReceiveAmount, dAppTokensAmountB, tokenShareSupply) | |
131 | + | [ScriptTransfer(contextObj.caller, tokensToPayA, assetIdTokenA), ScriptTransfer(contextObj.caller, tokensToPayB, assetIdTokenB), IntegerEntry("amountTokenA", (dAppTokensAmountA - tokensToPayA)), IntegerEntry("amountTokenB", (dAppTokensAmountB - tokensToPayB)), IntegerEntry("share_token_supply", (tokenShareSupply - tokenReceiveAmount)), Burn(assetIdTokenShare, tokenReceiveAmount)] | |
132 | + | } | |
133 | + | } | |
134 | + | ||
135 | + | ||
136 | + | ||
137 | + | @Callable(contextObj) | |
138 | + | func exchanger (minTokenRecieve) = { | |
139 | + | let payment = value(contextObj.payments[0]) | |
140 | + | let assetIdReceived = payment.assetId | |
141 | + | let tokenReceiveAmount = payment.amount | |
142 | + | let count = value(getInteger(this, "exchange_count")) | |
143 | + | if ((assetIdReceived == assetIdTokenB)) | |
144 | + | then { | |
145 | + | let tokenSendAmount = ((fraction(amountTokenA, tokenReceiveAmount, (tokenReceiveAmount + amountTokenB)) * (comissionScaleDelimiter - comission)) / comissionScaleDelimiter) | |
146 | + | if ((minTokenRecieve > tokenSendAmount)) | |
147 | + | then throw("Price has changed dramaticaly. Receiving token amount don't satisfy specified price level") | |
148 | + | else { | |
149 | + | let assetIdSent = assetIdTokenA | |
150 | + | [IntegerEntry("amountTokenA", (amountTokenA - tokenSendAmount)), IntegerEntry("amountTokenB", (amountTokenB + tokenReceiveAmount)), IntegerEntry("exchange_count", (count + 1)), ScriptTransfer(contextObj.caller, tokenSendAmount, assetIdSent)] | |
151 | + | } | |
152 | + | } | |
153 | + | else if ((assetIdReceived == assetIdTokenA)) | |
154 | + | then { | |
155 | + | let tokenSendAmount = ((fraction(amountTokenB, tokenReceiveAmount, (tokenReceiveAmount + amountTokenA)) * (comissionScaleDelimiter - comission)) / comissionScaleDelimiter) | |
156 | + | if ((minTokenRecieve > tokenSendAmount)) | |
157 | + | then throw("Price has changed dramaticaly. Receiving token amount don't satisfy specified price level") | |
158 | + | else { | |
159 | + | let assetIdSent = assetIdTokenB | |
160 | + | [IntegerEntry("amountTokenA", (amountTokenA + tokenReceiveAmount)), IntegerEntry("amountTokenB", (amountTokenB - tokenSendAmount)), IntegerEntry("exchange_count", (count + 1)), ScriptTransfer(contextObj.caller, tokenSendAmount, assetIdSent)] | |
161 | + | } | |
162 | + | } | |
163 | + | else throw("Asset is not allowed") | |
164 | + | } | |
165 | + | ||
166 | + |
github/deemru/w8io/026f985 20.73 ms ◑