tx · EUUioRic3MvkdU9iV7Y2qsy6r4B5rGYZ6DKxW7YQzxTL 3N5JsQHh6GJBT7gCj8pKKGhfmdVbHUUE7Ra: -0.01000000 Waves 2021.06.11 18:00 [1565849] smart account 3N5JsQHh6GJBT7gCj8pKKGhfmdVbHUUE7Ra > SELF 0.00000000 Waves
{ "type": 13, "id": "EUUioRic3MvkdU9iV7Y2qsy6r4B5rGYZ6DKxW7YQzxTL", "fee": 1000000, "feeAssetId": null, "timestamp": 1623423732114, "version": 2, "chainId": 84, "sender": "3N5JsQHh6GJBT7gCj8pKKGhfmdVbHUUE7Ra", "senderPublicKey": "6hg3zCfLeDbfSrz2QVG7hdax7eXSpabUDqSP1ya8PBVZ", "proofs": [ "2EXdfUzvbgzEde2nmNTRSnHeUH53S2Qqw4YkXYF5k1xwvazhDM8PnABiwWZU6uSjWizTGqGALgKeTT96ap1rWz8M" ], "script": "base64:AAIEAAAAAAAAABIIAhIECgIIARIDCgEIEgMKAQgAAAAKAAAAABBrUHJvcG9zZWRBc3NldElkAgAAABNfcHJvcG9zZWRfYXNzZXQxX2lkAAAAABRrUHJvcG9zZWRBc3NldEFtb3VudAIAAAAXX3Byb3Bvc2VkX2Fzc2V0MV9hbW91bnQAAAAAD2tEZXNpcmVkQXNzZXRJZAIAAAASX2Rlc2lyZWRfYXNzZXQxX2lkAAAAAA5rRGVzaXJlZEFtb3VudAIAAAAWX2Rlc2lyZWRfYXNzZXQxX2Ftb3VudAAAAAAHa1N0YXR1cwIAAAAHX3N0YXR1cwAAAAAGa093bmVyAgAAAAZfb3duZXIAAAAACmtDbG9zZVR4SWQCAAAADF9jbG9zZV90eF9pZAAAAAAMc3RhdHVzQWN0aXZlAgAAAAZBY3RpdmUAAAAADnN0YXR1c0NhbmNlbGVkAgAAAAhDYW5jZWxlZAAAAAAKc3RhdHVzRG9uZQIAAAAERG9uZQAAAAMAAAABaQEAAAANcGxhY2VQcm9wb3NhbAAAAAIAAAASZGVzaXJlVG9HZXRBc3NldElk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AAAACBQAAAAJpZAUAAAAUa1Byb3Bvc2VkQXNzZXRBbW91bnQCAAAAGVByb3Bvc2VkIGFtb3VudCBub3QgZm91bmQJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwUAAAAJb3duZXJBZGRyBQAAABJkZXNpcmVkQXNzZXRBbW91bnQFAAAADmRlc2lyZWRBc3NldElkCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMIBQAAAAFpAAAABmNhbGxlcgUAAAATcHJvcG9zZWRBc3NldEFtb3VudAUAAAAPcHJvcG9zZWRBc3NldElkCQAETAAAAAIJAQAAAAtTdHJpbmdFbnRyeQAAAAIJAAEsAAAAAgUAAAACaWQFAAAAB2tTdGF0dXMFAAAACnN0YXR1c0RvbmUJAARMAAAAAgkBAAAAC1N0cmluZ0VudHJ5AAAAAgkAASwAAAACBQAAAAJpZAUAAAAKa0Nsb3NlVHhJZAkAAlgAAAABCAUAAAABaQAAAA10cmFuc2FjdGlvbklkBQAAAANuaWwAAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAACQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleUmMb78=", "height": 1565849, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: BLMP5ftxN92eJxKwSMCwNBp8oaY1Pd5Bairfs5X7KcF9 Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 4 #-} | |
2 | + | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | + | {-# CONTENT_TYPE DAPP #-} | |
4 | + | let a = "_proposed_asset1_id" | |
5 | + | ||
6 | + | let b = "_proposed_asset1_amount" | |
7 | + | ||
8 | + | let c = "_desired_asset1_id" | |
9 | + | ||
10 | + | let d = "_desired_asset1_amount" | |
11 | + | ||
12 | + | let e = "_status" | |
13 | + | ||
14 | + | let f = "_owner" | |
15 | + | ||
16 | + | let g = "_close_tx_id" | |
17 | + | ||
18 | + | let h = "Active" | |
19 | + | ||
20 | + | let i = "Canceled" | |
21 | + | ||
22 | + | let j = "Done" | |
23 | + | ||
24 | + | @Callable(k) | |
25 | + | func placeProposal (l,m) = { | |
26 | + | let n = $Tuple2(k.payments[0].amount, toBase58String(value(k.payments[0].assetId))) | |
27 | + | let o = n._1 | |
28 | + | let p = n._2 | |
29 | + | let q = toBase58String(k.transactionId) | |
30 | + | [StringEntry((q + f), toString(k.caller)), StringEntry((q + a), p), IntegerEntry((q + b), o), StringEntry((q + c), l), IntegerEntry((q + d), m), StringEntry((q + e), h)] | |
31 | + | } | |
32 | + | ||
33 | + | ||
34 | + | ||
35 | + | @Callable(k) | |
36 | + | func cancelProposal (q) = { | |
37 | + | let r = valueOrErrorMessage(getString(this, (q + e)), (("Proposal with id '" + q) + "' not found")) | |
38 | + | if ((r != h)) | |
39 | + | then throw(((("Proposal with id '" + q) + "' is not active. Status: ") + r)) | |
40 | + | else { | |
41 | + | let s = addressFromStringValue(valueOrErrorMessage(getString(this, (q + f)), "owner not set")) | |
42 | + | let t = valueOrErrorMessage(getString(this, (q + a)), "Proposed asset not found") | |
43 | + | let u = valueOrErrorMessage(getInteger(this, (q + b)), "Proposed amount not found") | |
44 | + | [ScriptTransfer(s, u, fromBase58String(t)), StringEntry((q + e), i), StringEntry((q + g), toBase58String(k.transactionId))] | |
45 | + | } | |
46 | + | } | |
47 | + | ||
48 | + | ||
49 | + | ||
50 | + | @Callable(k) | |
51 | + | func acceptProposal (q) = { | |
52 | + | let v = $Tuple2(k.payments[0].amount, value(k.payments[0].assetId)) | |
53 | + | let o = v._1 | |
54 | + | let p = v._2 | |
55 | + | let r = valueOrErrorMessage(getString(this, (q + e)), (("Proposal with id '" + q) + "' not found")) | |
56 | + | if ((r != h)) | |
57 | + | then throw(((("Proposal with id '" + q) + "' is not active. Status: ") + r)) | |
58 | + | else { | |
59 | + | let w = valueOrErrorMessage(fromBase58String(valueOrErrorMessage(getString(this, (q + c)), "Desired asset not found")), "Incorrect desired asset id") | |
60 | + | let x = valueOrErrorMessage(getInteger(this, (q + d)), "Desired amount not found") | |
61 | + | if ((w != p)) | |
62 | + | then throw("Atatched asset doesn't match desired") | |
63 | + | else if ((x != o)) | |
64 | + | then throw("Attached asset amount doesn't match") | |
65 | + | else { | |
66 | + | let s = addressFromStringValue(valueOrErrorMessage(getString(this, (q + f)), "owner not set")) | |
67 | + | let t = valueOrErrorMessage(fromBase58String(valueOrErrorMessage(getString(this, (q + a)), "Proposed asset not found")), "Incorrect proposed asset id") | |
68 | + | let u = valueOrErrorMessage(getInteger(this, (q + b)), "Proposed amount not found") | |
69 | + | [ScriptTransfer(s, x, w), ScriptTransfer(k.caller, u, t), StringEntry((q + e), j), StringEntry((q + g), toBase58String(k.transactionId))] | |
70 | + | } | |
71 | + | } | |
72 | + | } | |
73 | + | ||
74 | + | ||
75 | + | @Verifier(y) | |
76 | + | func z () = sigVerify(y.bodyBytes, y.proofs[0], y.senderPublicKey) | |
77 | + |
github/deemru/w8io/169f3d6 154.25 ms ◑