tx · 93Suy4uY89dQApWJsPJtCag9kuaPkHv7633rR1ZouqjY

3N7ZQDNskguAikFYpHDs3nSLEqZ1kcawW2w:  -0.01400000 Waves

2020.08.02 19:14 [1114951] smart account 3N7ZQDNskguAikFYpHDs3nSLEqZ1kcawW2w > SELF 0.00000000 Waves

{ "type": 13, "id": "93Suy4uY89dQApWJsPJtCag9kuaPkHv7633rR1ZouqjY", "fee": 1400000, "feeAssetId": null, "timestamp": 1596384899017, "version": 1, "sender": "3N7ZQDNskguAikFYpHDs3nSLEqZ1kcawW2w", "senderPublicKey": "9Q2WA38S5hRejUw8CCQ7qorks92Bg8C8Mbfqwj6mQZgV", "proofs": [ "2nZjxn7f6UzRskHK3yGHb2Nn9DKwNtMoMzYiYKGydWkZPVuHHicmydht94m5HquBNJhXCaTLETn39XW38CQqtNio" ], "script": "base64:AAIDAAAAAAAAAAgIARIECgIICAAAAAAAAAABAAAAAWkBAAAABXN3YXBwAAAAAgAAAAxzd2FwcEFzc2V0SWQAAAACaWQEAAAAA3BtdAkBAAAAB2V4dHJhY3QAAAABCAUAAAABaQAAAAdwYXltZW50BAAAAAlwbXRBbW91bnQIBQAAAANwbXQAAAAGYW1vdW50BAAAAAdhc3NldGlkCQACWQAAAAEFAAAAAmlkBAAAAAxzd2FwcGFzc2V0aWQJAAJZAAAAAQUAAAAMc3dhcHBBc3NldElkBAAAAA1hc3NldFF1YW50aXR5BAAAAAckbWF0Y2gwCQAD7AAAAAEFAAAAB2Fzc2V0aWQDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAABUFzc2V0BAAAAAVhc3NldAUAAAAHJG1hdGNoMAgFAAAABWFzc2V0AAAACHF1YW50aXR5CQAAAgAAAAECAAAAEENhbid0IGZpbmQgYXNzZXQEAAAADHdhcHBRdWFudGl0eQQAAAAHJG1hdGNoMAkAA+wAAAABBQAAAAxzd2FwcGFzc2V0aWQDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAABUFzc2V0BAAAAAVhc3NldAUAAAAH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IIBQAAAANkdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAADZHR4AAAAD3NlbmRlclB1YmxpY0tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAUU2V0U2NyaXB0VHJhbnNhY3Rpb24EAAAAA3N0eAUAAAAHJG1hdGNoMAkAAfQAAAADCAUAAAADc3R4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAADc3R4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAA3N0eAAAAA9zZW5kZXJQdWJsaWNLZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAE1RyYW5zZmVyVHJhbnNhY3Rpb24EAAAAA3R0eAUAAAAHJG1hdGNoMAkAAfQAAAADCAUAAAADdHR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAADdHR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAA3R0eAAAAA9zZW5kZXJQdWJsaWNLZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAF01hc3NUcmFuc2ZlclRyYW5zYWN0aW9uBAAAAANtdHgFAAAAByRtYXRjaDAJAAH0AAAAAwgFAAAAA210eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAA210eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAANtdHgAAAAPc2VuZGVyUHVibGljS2V5B0xdmRQ=", "chainId": 84, "height": 1114951, "spentComplexity": 0 } View: original | compacted Prev: DxK1tED6kmrUjyqn3xemmwpza1SJNzkbiVqLRFCSNK5y Next: 9n6u2qcU3G1mZFMTRT1rn3wSv45cnBmRz4nRw1aDgo2t Diff:
OldNewDifferences
2525 if ((beforeRate > 1))
2626 then {
2727 let sendAmount = (pmtAmount * 1)
28- TransferSet([ScriptTransfer(i.caller, sendAmount, swappassetid)])
28+ if ((sendAmount > 100000000000))
29+ then throw("Not SWAPP over 1000 WAPP")
30+ else TransferSet([ScriptTransfer(i.caller, sendAmount, swappassetid)])
2931 }
3032 else if ((1 > beforeRate))
3133 then {
3234 let sendAmount = (pmtAmount * beforeRate)
33- TransferSet([ScriptTransfer(i.caller, sendAmount, swappassetid)])
35+ if ((sendAmount > 100000000000))
36+ then throw("Not SWAPP over 1000 WAPP")
37+ else TransferSet([ScriptTransfer(i.caller, sendAmount, swappassetid)])
3438 }
3539 else throw("Not SWAPP")
3640 }
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44
55
66 @Callable(i)
77 func swapp (swappAssetId,id) = {
88 let pmt = extract(i.payment)
99 let pmtAmount = pmt.amount
1010 let assetid = fromBase58String(id)
1111 let swappassetid = fromBase58String(swappAssetId)
1212 let assetQuantity = match assetInfo(assetid) {
1313 case asset: Asset =>
1414 asset.quantity
1515 case _ =>
1616 throw("Can't find asset")
1717 }
1818 let wappQuantity = match assetInfo(swappassetid) {
1919 case asset: Asset =>
2020 asset.quantity
2121 case _ =>
2222 throw("Can't find asset")
2323 }
2424 let beforeRate = (wappQuantity / assetQuantity)
2525 if ((beforeRate > 1))
2626 then {
2727 let sendAmount = (pmtAmount * 1)
28- TransferSet([ScriptTransfer(i.caller, sendAmount, swappassetid)])
28+ if ((sendAmount > 100000000000))
29+ then throw("Not SWAPP over 1000 WAPP")
30+ else TransferSet([ScriptTransfer(i.caller, sendAmount, swappassetid)])
2931 }
3032 else if ((1 > beforeRate))
3133 then {
3234 let sendAmount = (pmtAmount * beforeRate)
33- TransferSet([ScriptTransfer(i.caller, sendAmount, swappassetid)])
35+ if ((sendAmount > 100000000000))
36+ then throw("Not SWAPP over 1000 WAPP")
37+ else TransferSet([ScriptTransfer(i.caller, sendAmount, swappassetid)])
3438 }
3539 else throw("Not SWAPP")
3640 }
3741
3842
3943 @Verifier(tx)
4044 func verify () = match tx {
4145 case dtx: DataTransaction =>
4246 sigVerify(dtx.bodyBytes, dtx.proofs[0], dtx.senderPublicKey)
4347 case stx: SetScriptTransaction =>
4448 sigVerify(stx.bodyBytes, stx.proofs[0], stx.senderPublicKey)
4549 case ttx: TransferTransaction =>
4650 sigVerify(ttx.bodyBytes, ttx.proofs[0], ttx.senderPublicKey)
4751 case mtx: MassTransferTransaction =>
4852 sigVerify(mtx.bodyBytes, mtx.proofs[0], mtx.senderPublicKey)
4953 case _ =>
5054 false
5155 }
5256

github/deemru/w8io/026f985 
29.51 ms