tx · BLMP5ftxN92eJxKwSMCwNBp8oaY1Pd5Bairfs5X7KcF9

3N5JsQHh6GJBT7gCj8pKKGhfmdVbHUUE7Ra:  -0.01400000 Waves

2021.06.11 20:15 [1565984] smart account 3N5JsQHh6GJBT7gCj8pKKGhfmdVbHUUE7Ra > SELF 0.00000000 Waves

{ "type": 13, "id": "BLMP5ftxN92eJxKwSMCwNBp8oaY1Pd5Bairfs5X7KcF9", "fee": 1400000, "feeAssetId": null, "timestamp": 1623431791360, "version": 2, "chainId": 84, "sender": "3N5JsQHh6GJBT7gCj8pKKGhfmdVbHUUE7Ra", "senderPublicKey": "6hg3zCfLeDbfSrz2QVG7hdax7eXSpabUDqSP1ya8PBVZ", "proofs": [ "2j8PGr41GGfKD2bQFuRDW5z2etzBZchc7AJ9xDYCREHQwtn234mSrfk93i7HjTM474tLqc8VbASfJZ5sK75dhkut" ], "script": "base64:AAIEAAAAAAAAABIIAhIECgIIARIDCgEIEgMKAQgAAAAKAAAAABBrUHJvcG9zZWRBc3NldElkAgAAABNfcHJvcG9zZWRfYXNzZXQxX2lkAAAAABRrUHJvcG9zZWRBc3NldEFtb3VudAIAAAAXX3Byb3Bvc2VkX2Fzc2V0MV9hbW91bnQAAAAAD2tEZXNpcmVkQXNzZXRJZAIAAAASX2Rlc2lyZWRfYXNzZXQxX2lkAAAAAA5rRGVzaXJlZEFtb3VudAIAAAAWX2Rlc2lyZWRfYXNzZXQxX2Ftb3VudAAAAAAHa1N0YXR1cwIAAAAHX3N0YXR1cwAAAAAGa093bmVyAgAAAAZfb3duZXIAAAAACmtDbG9zZVR4SWQCAAAADF9jbG9zZV90eF9pZAAAAAAMc3RhdHVzQWN0aXZlAgAAAAZBY3RpdmUAAAAADnN0YXR1c0NhbmNlbGVkAgAAAAhDYW5jZWxlZAAAAAAKc3RhdHVzRG9uZQIAAAAERG9uZQAAAAMAAAABaQEAAAANcGxhY2VQcm9wb3NhbAAAAAIAAAASZGVzaXJlVG9HZXRBc3NldElkAAAAE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IGlkBAAAABNwcm9wb3NlZEFzc2V0QW1vdW50CQEAAAATdmFsdWVPckVycm9yTWVzc2FnZQAAAAIJAAQaAAAAAgUAAAAEdGhpcwkAASwAAAACBQAAAAJpZAUAAAAUa1Byb3Bvc2VkQXNzZXRBbW91bnQCAAAAGVByb3Bvc2VkIGFtb3VudCBub3QgZm91bmQJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwUAAAAJb3duZXJBZGRyBQAAABJkZXNpcmVkQXNzZXRBbW91bnQFAAAADmRlc2lyZWRBc3NldElkCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMIBQAAAAFpAAAABmNhbGxlcgUAAAATcHJvcG9zZWRBc3NldEFtb3VudAUAAAAPcHJvcG9zZWRBc3NldElkCQAETAAAAAIJAQAAAAtTdHJpbmdFbnRyeQAAAAIJAAEsAAAAAgUAAAACaWQFAAAAB2tTdGF0dXMFAAAACnN0YXR1c0RvbmUJAARMAAAAAgkBAAAAC1N0cmluZ0VudHJ5AAAAAgkAASwAAAACBQAAAAJpZAUAAAAKa0Nsb3NlVHhJZAkAAlgAAAABCAUAAAABaQAAAA10cmFuc2FjdGlvbklkBQAAAANuaWwAAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAACQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleW/iGfY=", "height": 1565984, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: EUUioRic3MvkdU9iV7Y2qsy6r4B5rGYZ6DKxW7YQzxTL Next: FuKAqhWzSzR6W2kR1YWywd3kcH9SiKqzCZVY8jF2bqap Diff:
OldNewDifferences
4141 let s = addressFromStringValue(valueOrErrorMessage(getString(this, (q + f)), "owner not set"))
4242 let t = valueOrErrorMessage(getString(this, (q + a)), "Proposed asset not found")
4343 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))]
44+ if ((k.caller != s))
45+ then throw("Only owner can cancel")
46+ else [ScriptTransfer(s, u, fromBase58String(t)), StringEntry((q + e), i), StringEntry((q + g), toBase58String(k.transactionId))]
4547 }
4648 }
4749
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 4 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = "_proposed_asset1_id"
55
66 let b = "_proposed_asset1_amount"
77
88 let c = "_desired_asset1_id"
99
1010 let d = "_desired_asset1_amount"
1111
1212 let e = "_status"
1313
1414 let f = "_owner"
1515
1616 let g = "_close_tx_id"
1717
1818 let h = "Active"
1919
2020 let i = "Canceled"
2121
2222 let j = "Done"
2323
2424 @Callable(k)
2525 func placeProposal (l,m) = {
2626 let n = $Tuple2(k.payments[0].amount, toBase58String(value(k.payments[0].assetId)))
2727 let o = n._1
2828 let p = n._2
2929 let q = toBase58String(k.transactionId)
3030 [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)]
3131 }
3232
3333
3434
3535 @Callable(k)
3636 func cancelProposal (q) = {
3737 let r = valueOrErrorMessage(getString(this, (q + e)), (("Proposal with id '" + q) + "' not found"))
3838 if ((r != h))
3939 then throw(((("Proposal with id '" + q) + "' is not active. Status: ") + r))
4040 else {
4141 let s = addressFromStringValue(valueOrErrorMessage(getString(this, (q + f)), "owner not set"))
4242 let t = valueOrErrorMessage(getString(this, (q + a)), "Proposed asset not found")
4343 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))]
44+ if ((k.caller != s))
45+ then throw("Only owner can cancel")
46+ else [ScriptTransfer(s, u, fromBase58String(t)), StringEntry((q + e), i), StringEntry((q + g), toBase58String(k.transactionId))]
4547 }
4648 }
4749
4850
4951
5052 @Callable(k)
5153 func acceptProposal (q) = {
5254 let v = $Tuple2(k.payments[0].amount, value(k.payments[0].assetId))
5355 let o = v._1
5456 let p = v._2
5557 let r = valueOrErrorMessage(getString(this, (q + e)), (("Proposal with id '" + q) + "' not found"))
5658 if ((r != h))
5759 then throw(((("Proposal with id '" + q) + "' is not active. Status: ") + r))
5860 else {
5961 let w = valueOrErrorMessage(fromBase58String(valueOrErrorMessage(getString(this, (q + c)), "Desired asset not found")), "Incorrect desired asset id")
6062 let x = valueOrErrorMessage(getInteger(this, (q + d)), "Desired amount not found")
6163 if ((w != p))
6264 then throw("Atatched asset doesn't match desired")
6365 else if ((x != o))
6466 then throw("Attached asset amount doesn't match")
6567 else {
6668 let s = addressFromStringValue(valueOrErrorMessage(getString(this, (q + f)), "owner not set"))
6769 let t = valueOrErrorMessage(fromBase58String(valueOrErrorMessage(getString(this, (q + a)), "Proposed asset not found")), "Incorrect proposed asset id")
6870 let u = valueOrErrorMessage(getInteger(this, (q + b)), "Proposed amount not found")
6971 [ScriptTransfer(s, x, w), ScriptTransfer(k.caller, u, t), StringEntry((q + e), j), StringEntry((q + g), toBase58String(k.transactionId))]
7072 }
7173 }
7274 }
7375
7476
7577 @Verifier(y)
7678 func z () = sigVerify(y.bodyBytes, y.proofs[0], y.senderPublicKey)
7779

github/deemru/w8io/169f3d6 
51.44 ms