tx · HnprLnJKmk9NoJyqFjff65iM2um2xCt5gwAEKtKhD7pQ
3N5Ju64uTPuaR4M4f9YB5LRYRNJ382MWrat: -0.00500000 Waves
2022.09.29 16:10 [2250435] smart account 3N5Ju64uTPuaR4M4f9YB5LRYRNJ382MWrat > SELF 0.00000000 Waves
{
"type": 13,
"id": "HnprLnJKmk9NoJyqFjff65iM2um2xCt5gwAEKtKhD7pQ",
"fee": 500000,
"feeAssetId": null,
"timestamp": 1664457021383,
"version": 2,
"chainId": 84,
"sender": "3N5Ju64uTPuaR4M4f9YB5LRYRNJ382MWrat",
"senderPublicKey": "AwWYbCDs6GDxAT6diG2mfEqD7tFz9JXu9k234FS135kR",
"proofs": [
"VjZcYYzzdkGxy2BRCgii89YQFzPLe6h4H6ZeK1Ufz7uUEPwhGb7y4rfSpKTs7nxaHTF6bULd4DjXf5vixd78Y32"
],
"script": "base64:AAIFAAAAAAAAAAgIAhIECgIIAQAAAAEAAAAABXJ1bGVyAgAAACxCZ3hwQ200d3hiVzhTS0xQS1puZjRLVTJENlpVMjlvdjhNZ1pya2FTQXFwWQAAAAEAAAABaQEAAAAEc3dhcAAAAAIAAAAIYXNzZXRPdXQAAAAHbWluaW11bQQAAAAJY2FsbGVyUGJrCQACWgAAAAEIBQAAAAFpAAAAD2NhbGxlclB1YmxpY0tleQMJAQAAAAIhPQAAAAIFAAAACWNhbGxlclBiawUAAAAFcnVsZXIJAAACAAAAAQkAASwAAAACCQABLAAAAAIJAAEsAAAAAgIAAAAJTm8tbm8tbm8gBQAAAAljYWxsZXJQYmsCAAAAAiwgBQAAAAVydWxlcgQAAAADcG10CQABkQAAAAIIBQAAAAFpAAAACHBheW1lbnRzAAAAAAAAAAAABAAAAAdhc3NldEluCQEAAAAFdmFsdWUAAAABCAUAAAADcG10AAAAB2Fzc2V0SWQEAAAACGFtb3VudEluCQEAAAAFdmFsdWUAAAABCAUAAAADcG10AAAABmFtb3VudAkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgIAAAACb3AAAAAAAAAAAAEFAAAAA25pbAAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5yXXlBA==",
"height": 2250435,
"applicationStatus": "succeeded",
"spentComplexity": 0
}
View: original | compacted
Prev: ATN1rUjfZodnigVCL11Zpt8AifdsQBsNGuXTaUgqhWwR
Next: 6frUCXny2wPGe4wGx37imT49mfAJp9xb1LTba1kVMsbu
Diff:
Old | New | | Differences |
---|
4 | 4 | | let ruler = "BgxpCm4wxbW8SKLPKZnf4KU2D6ZU29ov8MgZrkaSAqpY" |
---|
5 | 5 | | |
---|
6 | 6 | | @Callable(i) |
---|
7 | | - | func swap (assetOut,minimum) = if ((i.callerPublicKey != toBytes(ruler))) |
---|
8 | | - | then throw("No-no-no") |
---|
9 | | - | else { |
---|
10 | | - | let pmt = i.payments[0] |
---|
11 | | - | let assetIn = value(pmt.assetId) |
---|
12 | | - | let amountIn = value(pmt.amount) |
---|
| 7 | + | func swap (assetOut,minimum) = { |
---|
| 8 | + | let callerPbk = toBase64String(i.callerPublicKey) |
---|
| 9 | + | if ((callerPbk != ruler)) |
---|
| 10 | + | then throw(((("No-no-no " + callerPbk) + ", ") + ruler)) |
---|
| 11 | + | else { |
---|
| 12 | + | let pmt = i.payments[0] |
---|
| 13 | + | let assetIn = value(pmt.assetId) |
---|
| 14 | + | let amountIn = value(pmt.amount) |
---|
13 | 15 | | [IntegerEntry("op", 1)] |
---|
14 | | - | } |
---|
| 16 | + | } |
---|
| 17 | + | } |
---|
15 | 18 | | |
---|
16 | 19 | | |
---|
17 | 20 | | @Verifier(tx) |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 5 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | 4 | | let ruler = "BgxpCm4wxbW8SKLPKZnf4KU2D6ZU29ov8MgZrkaSAqpY" |
---|
5 | 5 | | |
---|
6 | 6 | | @Callable(i) |
---|
7 | | - | func swap (assetOut,minimum) = if ((i.callerPublicKey != toBytes(ruler))) |
---|
8 | | - | then throw("No-no-no") |
---|
9 | | - | else { |
---|
10 | | - | let pmt = i.payments[0] |
---|
11 | | - | let assetIn = value(pmt.assetId) |
---|
12 | | - | let amountIn = value(pmt.amount) |
---|
| 7 | + | func swap (assetOut,minimum) = { |
---|
| 8 | + | let callerPbk = toBase64String(i.callerPublicKey) |
---|
| 9 | + | if ((callerPbk != ruler)) |
---|
| 10 | + | then throw(((("No-no-no " + callerPbk) + ", ") + ruler)) |
---|
| 11 | + | else { |
---|
| 12 | + | let pmt = i.payments[0] |
---|
| 13 | + | let assetIn = value(pmt.assetId) |
---|
| 14 | + | let amountIn = value(pmt.amount) |
---|
13 | 15 | | [IntegerEntry("op", 1)] |
---|
14 | | - | } |
---|
| 16 | + | } |
---|
| 17 | + | } |
---|
15 | 18 | | |
---|
16 | 19 | | |
---|
17 | 20 | | @Verifier(tx) |
---|
18 | 21 | | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) |
---|
19 | 22 | | |
---|