tx · DDpUWDq62oidgqFWr8YRJax3Y7f8Q5UmYnsTkmPWrNZ8

3N5Ju64uTPuaR4M4f9YB5LRYRNJ382MWrat:  -0.00600000 Waves

2022.09.29 17:50 [2250540] smart account 3N5Ju64uTPuaR4M4f9YB5LRYRNJ382MWrat > SELF 0.00000000 Waves

{ "type": 13, "id": "DDpUWDq62oidgqFWr8YRJax3Y7f8Q5UmYnsTkmPWrNZ8", "fee": 600000, "feeAssetId": null, "timestamp": 1664463004547, "version": 2, "chainId": 84, "sender": "3N5Ju64uTPuaR4M4f9YB5LRYRNJ382MWrat", "senderPublicKey": "AwWYbCDs6GDxAT6diG2mfEqD7tFz9JXu9k234FS135kR", "proofs": [ "51xd7d4BWhvKbJEAfBzdcpPnCZ8WH4jAwPurDBVAAzZevL5kBtcJ8K2gRfTqVBbU8iYqRRPgQti25hrYb7mKRPTj" ], "script": "base64:AAIFAAAAAAAAAAgIAhIECgIIAQAAAAYAAAAABXJ1bGVyAgAAACxCZ3hwQ200d3hiVzhTS0xQS1puZjRLVTJENlpVMjlvdjhNZ1pya2FTQXFwWQAAAAAIYm9ibWFfaWQCAAAALDV4eXJVb0p1WEpjWXhjOFJmcm9XajRRZUxhdzZ4aEJmQWRTcmVTdFlDUk1uAAAAAAhidWdnc19pZAIAAAAsSDVVVXVQSjdXQlh6amc2WjFhaEJVeGo3VldvVkZGZkczQk16eUFBblJXdDYBAAAADmdldEFzc2V0U3RyaW5nAAAAAQAAAAdhc3NldElkBAAAAAckbWF0Y2gwBQAAAAdhc3NldElkAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAApCeXRlVmVjdG9yBAAAAAFiBQAAAAckbWF0Y2gwCQACWAAAAAEFAAAAAWICAAAABVdBVkVTAQAAAA1nZXRBc3NldEJ5dGVzAAAAAQAAAAdhc3NldElkAwkAAAAAAAACBQAAAAdhc3NldElkAgAAAAVXQVZFUwUAAAAEdW5pdAkAAlkAAAABBQAAAAdhc3NldElkAQAAAAlteUJhbGFuY2UAAAABAAAAB2Fzc2V0SWQEAAAAByRtYXRjaDAFAAAAB2Fzc2V0SWQDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAACkJ5dGVWZWN0b3IEAAAAAWIFAAAAByRtYXRjaDAJAAPwAAAAAgUAAAAEdGhpcwUAAAABYggJAAPvAAAAAQUAAAAEdGhpcwAAAAlhdmFpbGFibGUAAAABAAAAAWkBAAAABHN3YXAAAAACAAAACGFzc2V0T3V0AAAAB21pbmltdW0EAAAADWJvbWJhX2JhbGFuY2UJAQAAAAlteUJhbGFuY2UAAAABCQEAAAANZ2V0QXNzZXRCeXRlcwAAAAEFAAAACGJvYm1hX2lkBAAAAA1idWdnc19iYWxhbmNlCQEAAAAJbXlCYWxhbmNlAAAAAQkBAAAADWdldEFzc2V0Qnl0ZXMAAAABBQAAAAhidWdnc19pZAQAAAADcG10CQABkQAAAAIIBQAAAAFpAAAACHBheW1lbnRzAAAAAAAAAAAABAAAAAdhc3NldEluCQEAAAAFdmFsdWUAAAABCAUAAAADcG10AAAAB2Fzc2V0SWQEAAAACGFtb3VudEluCQEAAAAFdmFsdWUAAAABCAUAAAADcG10AAAABmFtb3VudAQAAAAJYW1vdW50T3V0CQAAaAAAAAIFAAAACGFtb3VudEluAAAAAAAAAAACCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMIBQAAAAFpAAAABmNhbGxlcgUAAAAJYW1vdW50T3V0CQEAAAANZ2V0QXNzZXRCeXRlcwAAAAEFAAAACGFzc2V0T3V0BQAAAANuaWwAAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAACQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tled/BcxI=", "height": 2250540, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: E3QUQ9babF8rejcj5DDXAxMHN67K5QssFH7v9sASqs6v Next: 3aELsFYUoLishK8tVoY9GcFBTJLqbfoVMkDwMMvEGXef Diff:
OldNewDifferences
3030
3131 @Callable(i)
3232 func swap (assetOut,minimum) = {
33- let callerPbk = toBase58String(i.callerPublicKey)
34- if ((callerPbk != ruler))
35- then throw("No-no-no")
36- else {
37- let bomba_balance = myBalance(getAssetBytes(bobma_id))
38- let buggs_balance = myBalance(getAssetBytes(buggs_id))
39- let pmt = i.payments[0]
40- let assetIn = value(pmt.assetId)
41- let amountIn = value(pmt.amount)
42- let amountOut = (amountIn * 2)
33+ let bomba_balance = myBalance(getAssetBytes(bobma_id))
34+ let buggs_balance = myBalance(getAssetBytes(buggs_id))
35+ let pmt = i.payments[0]
36+ let assetIn = value(pmt.assetId)
37+ let amountIn = value(pmt.amount)
38+ let amountOut = (amountIn * 2)
4339 [ScriptTransfer(i.caller, amountOut, getAssetBytes(assetOut))]
44- }
4540 }
4641
4742
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let ruler = "BgxpCm4wxbW8SKLPKZnf4KU2D6ZU29ov8MgZrkaSAqpY"
55
66 let bobma_id = "5xyrUoJuXJcYxc8RfroWj4QeLaw6xhBfAdSreStYCRMn"
77
88 let buggs_id = "H5UUuPJ7WBXzjg6Z1ahBUxj7VWoVFFfG3BMzyAAnRWt6"
99
1010 func getAssetString (assetId) = match assetId {
1111 case b: ByteVector =>
1212 toBase58String(b)
1313 case _ =>
1414 "WAVES"
1515 }
1616
1717
1818 func getAssetBytes (assetId) = if ((assetId == "WAVES"))
1919 then unit
2020 else fromBase58String(assetId)
2121
2222
2323 func myBalance (assetId) = match assetId {
2424 case b: ByteVector =>
2525 assetBalance(this, b)
2626 case _ =>
2727 wavesBalance(this).available
2828 }
2929
3030
3131 @Callable(i)
3232 func swap (assetOut,minimum) = {
33- let callerPbk = toBase58String(i.callerPublicKey)
34- if ((callerPbk != ruler))
35- then throw("No-no-no")
36- else {
37- let bomba_balance = myBalance(getAssetBytes(bobma_id))
38- let buggs_balance = myBalance(getAssetBytes(buggs_id))
39- let pmt = i.payments[0]
40- let assetIn = value(pmt.assetId)
41- let amountIn = value(pmt.amount)
42- let amountOut = (amountIn * 2)
33+ let bomba_balance = myBalance(getAssetBytes(bobma_id))
34+ let buggs_balance = myBalance(getAssetBytes(buggs_id))
35+ let pmt = i.payments[0]
36+ let assetIn = value(pmt.assetId)
37+ let amountIn = value(pmt.amount)
38+ let amountOut = (amountIn * 2)
4339 [ScriptTransfer(i.caller, amountOut, getAssetBytes(assetOut))]
44- }
4540 }
4641
4742
4843 @Verifier(tx)
4944 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
5045

github/deemru/w8io/026f985 
20.28 ms