tx · ATN1rUjfZodnigVCL11Zpt8AifdsQBsNGuXTaUgqhWwR
3N5Ju64uTPuaR4M4f9YB5LRYRNJ382MWrat: -0.00500000 Waves
2022.09.29 16:08 [2250431] smart account 3N5Ju64uTPuaR4M4f9YB5LRYRNJ382MWrat > SELF 0.00000000 Waves
{
"type": 13,
"id": "ATN1rUjfZodnigVCL11Zpt8AifdsQBsNGuXTaUgqhWwR",
"fee": 500000,
"feeAssetId": null,
"timestamp": 1664456872735,
"version": 2,
"chainId": 84,
"sender": "3N5Ju64uTPuaR4M4f9YB5LRYRNJ382MWrat",
"senderPublicKey": "AwWYbCDs6GDxAT6diG2mfEqD7tFz9JXu9k234FS135kR",
"proofs": [
"41eZDbbTSZTT769NvpTJY5AELKuQLm6qXCdnF35zkXZbay5ooKXPAwaypaUBsMK96FHC7q5jgxDqJKdDErjanyqh"
],
"script": "base64:AAIFAAAAAAAAAAgIAhIECgIIAQAAAAEAAAAABXJ1bGVyAgAAACxCZ3hwQ200d3hiVzhTS0xQS1puZjRLVTJENlpVMjlvdjhNZ1pya2FTQXFwWQAAAAEAAAABaQEAAAAEc3dhcAAAAAIAAAAIYXNzZXRPdXQAAAAHbWluaW11bQMJAQAAAAIhPQAAAAIIBQAAAAFpAAAAD2NhbGxlclB1YmxpY0tleQkAAZsAAAABBQAAAAVydWxlcgkAAAIAAAABAgAAAAhOby1uby1ubwQAAAADcG10CQABkQAAAAIIBQAAAAFpAAAACHBheW1lbnRzAAAAAAAAAAAABAAAAAdhc3NldEluCQEAAAAFdmFsdWUAAAABCAUAAAADcG10AAAAB2Fzc2V0SWQEAAAACGFtb3VudEluCQEAAAAFdmFsdWUAAAABCAUAAAADcG10AAAABmFtb3VudAkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgIAAAACb3AAAAAAAAAAAAEFAAAAA25pbAAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5Y71DTw==",
"height": 2250431,
"applicationStatus": "succeeded",
"spentComplexity": 0
}
View: original | compacted
Prev: 6xYAGNXgo9H2k6jptZhdqfNSRBE7tCdPLu8Q2gf5XS5p
Next: HnprLnJKmk9NoJyqFjff65iM2um2xCt5gwAEKtKhD7pQ
Diff:
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) = { |
---|
8 | | - | let pmt = i.payments[0] |
---|
9 | | - | let assetIn = value(pmt.assetId) |
---|
10 | | - | let amountIn = value(pmt.amount) |
---|
11 | | - | if (true) |
---|
12 | | - | then throw(((("ID: " + toBase64String(assetIn)) + ", amount: ") + toString(amountIn))) |
---|
13 | | - | else [IntegerEntry("op", 1)] |
---|
14 | | - | } |
---|
| 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) |
---|
| 13 | + | [IntegerEntry("op", 1)] |
---|
| 14 | + | } |
---|
15 | 15 | | |
---|
16 | 16 | | |
---|
17 | 17 | | @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) = { |
---|
8 | | - | let pmt = i.payments[0] |
---|
9 | | - | let assetIn = value(pmt.assetId) |
---|
10 | | - | let amountIn = value(pmt.amount) |
---|
11 | | - | if (true) |
---|
12 | | - | then throw(((("ID: " + toBase64String(assetIn)) + ", amount: ") + toString(amountIn))) |
---|
13 | | - | else [IntegerEntry("op", 1)] |
---|
14 | | - | } |
---|
| 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) |
---|
| 13 | + | [IntegerEntry("op", 1)] |
---|
| 14 | + | } |
---|
15 | 15 | | |
---|
16 | 16 | | |
---|
17 | 17 | | @Verifier(tx) |
---|
18 | 18 | | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) |
---|
19 | 19 | | |
---|