tx · 55QwGJL2GfDa372q7XqupRoTpERwzpN7f9kmrjAM3Wrw

3N4upXkARvecPGQAtpSQ11CFASTFsvEPiP2:  -0.01000000 Waves

2022.02.22 14:38 [1934810] smart account 3N4upXkARvecPGQAtpSQ11CFASTFsvEPiP2 > SELF 0.00000000 Waves

{ "type": 13, "id": "55QwGJL2GfDa372q7XqupRoTpERwzpN7f9kmrjAM3Wrw", "fee": 1000000, "feeAssetId": null, "timestamp": 1645529936664, "version": 2, "chainId": 84, "sender": "3N4upXkARvecPGQAtpSQ11CFASTFsvEPiP2", "senderPublicKey": "5dTGvAkGC1ryvEkRCst923pqULtN3qWs6XXueerWos1D", "proofs": [ "5GnWCXbA9j4EPYsAyp6uT2PHM5VUReLTwGHaXEzTsogoBuSHnuU9vTGKkb3kEEv5LXCKrNGJfrySQTnZWQt1WCXC" ], "script": "base64:AAIFAAAAAAAAAAwIAhIDCgEIEgMKAQgAAAAEAAAAAAdrZXlIZWFkAgAAAARoZWFkAQAAAAdrZXlQcmV2AAAAAQAAAAJpZAkAASwAAAACBQAAAAJpZAIAAAAGX19wcmV2AQAAAAdrZXlOZXh0AAAAAQAAAAJpZAkAASwAAAACBQAAAAJpZAIAAAAGX19uZXh0AAAAAARoZWFkCQAEHQAAAAIFAAAABHRoaXMFAAAAB2tleUhlYWQAAAACAAAAAWkBAAAABmluc2VydAAAAAEAAAACaWQEAAAABHByZXYJAAQdAAAAAgUAAAAEdGhpcwkBAAAAB2tleVByZXYAAAABBQAAAAJpZAQAAAAEbmV4dAkABB0AAAACBQAAAAR0aGlzCQEAAAAHa2V5TmV4dAAAAAEFAAAAAmlkBAAAAAljaGVja05vZGUDAwMJAQAAAAIhPQAAAAIFAAAAAmlkBQAAAARoZWFkCQAAAAAAAAIFAAAABHByZXYFAAAABHVuaXQHCQAAAAAAAAIFAAAABG5leHQFAAAABHVuaXQHBgkAAAIAAAABAgAAAAtOb2RlIGV4aXN0cwMJAAAAAAAAAgUAAAAJY2hlY2tOb2RlBQ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JAQAAAAdrZXlQcmV2AAAAAQUAAAACaWQJAARMAAAAAgkBAAAAC0RlbGV0ZUVudHJ5AAAAAQkBAAAAB2tleU5leHQAAAABBQAAAAJpZAUAAAADbmlsAwkBAAAACWlzRGVmaW5lZAAAAAEFAAAABG5leHQJAARMAAAAAgkBAAAAC1N0cmluZ0VudHJ5AAAAAgUAAAAHa2V5SGVhZAkBAAAABXZhbHVlAAAAAQUAAAAEbmV4dAkABEwAAAACCQEAAAALRGVsZXRlRW50cnkAAAABCQEAAAAHa2V5TmV4dAAAAAEFAAAAAmlkCQAETAAAAAIJAQAAAAtEZWxldGVFbnRyeQAAAAEJAQAAAAdrZXlQcmV2AAAAAQkBAAAABXZhbHVlAAAAAQUAAAAEbmV4dAUAAAADbmlsAwkBAAAACWlzRGVmaW5lZAAAAAEFAAAABHByZXYJAARMAAAAAgkBAAAAC0RlbGV0ZUVudHJ5AAAAAQkBAAAAB2tleVByZXYAAAABBQAAAAJpZAkABEwAAAACCQEAAAALRGVsZXRlRW50cnkAAAABCQEAAAAHa2V5TmV4dAAAAAEJAQAAAAV2YWx1ZQAAAAEFAAAABHByZXYFAAAAA25pbAMJAAAAAAAAAgUAAAACaWQFAAAABGhlYWQJAARMAAAAAgkBAAAAC0RlbGV0ZUVudHJ5AAAAAQUAAAAHa2V5SGVhZAUAAAADbmlsCQAAAgAAAAECAAAADEludmFsaWQgbm9kZQkABRQAAAACBQAAAAxzdGF0ZUNoYW5nZXMFAAAABHVuaXQAAAAAlrs5Vw==", "height": 1934810, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: CqxKxLgE9WGTo23kyKgAah2N8qP22fm6jyggB4NtWzzp Next: VhTm4Ru152oV8xouxFwFWckBUFCNvzd6em3NvtUq97v Diff:
OldNewDifferences
1313
1414 @Callable(i)
1515 func insert (id) = {
16+ let prev = getString(this, keyPrev(id))
17+ let next = getString(this, keyNext(id))
1618 let checkNode = if (if (if ((id != head))
17- then !(isDefined(keyPrev(id)))
19+ then (prev == unit)
1820 else false)
19- then !(isDefined(keyNext(id)))
21+ then (next == unit)
2022 else false)
2123 then true
2224 else throw("Node exists")
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let keyHead = "head"
55
66 func keyPrev (id) = (id + "__prev")
77
88
99 func keyNext (id) = (id + "__next")
1010
1111
1212 let head = getString(this, keyHead)
1313
1414 @Callable(i)
1515 func insert (id) = {
16+ let prev = getString(this, keyPrev(id))
17+ let next = getString(this, keyNext(id))
1618 let checkNode = if (if (if ((id != head))
17- then !(isDefined(keyPrev(id)))
19+ then (prev == unit)
1820 else false)
19- then !(isDefined(keyNext(id)))
21+ then (next == unit)
2022 else false)
2123 then true
2224 else throw("Node exists")
2325 if ((checkNode == checkNode))
2426 then {
2527 let stateChanges = ((nil ++ (if (isDefined(head))
2628 then [StringEntry(keyNext(id), value(head)), StringEntry(keyPrev(value(head)), id)]
2729 else nil)) ++ [StringEntry(keyHead, id)])
2830 $Tuple2(stateChanges, unit)
2931 }
3032 else throw("Strict value is not equal to itself.")
3133 }
3234
3335
3436
3537 @Callable(i)
3638 func delete (id) = {
3739 let prev = getString(this, keyPrev(id))
3840 let next = getString(this, keyNext(id))
3941 let stateChanges = if (if (isDefined(prev))
4042 then isDefined(next)
4143 else false)
4244 then [StringEntry(keyNext(value(prev)), value(next)), StringEntry(keyPrev(value(next)), value(prev)), DeleteEntry(keyPrev(id)), DeleteEntry(keyNext(id))]
4345 else if (isDefined(next))
4446 then [StringEntry(keyHead, value(next)), DeleteEntry(keyNext(id)), DeleteEntry(keyPrev(value(next)))]
4547 else if (isDefined(prev))
4648 then [DeleteEntry(keyPrev(id)), DeleteEntry(keyNext(value(prev)))]
4749 else if ((id == head))
4850 then [DeleteEntry(keyHead)]
4951 else throw("Invalid node")
5052 $Tuple2(stateChanges, unit)
5153 }
5254
5355

github/deemru/w8io/169f3d6 
125.11 ms