tx · CqTNAzrYTqVVZfRaGpb624TCuEjB3ZwsBdMsj6o8i3CN

3MuBakQdFAobmsHH371bKVYNed6yA9Y2Wfy:  -0.01400000 Waves

2021.05.25 12:49 [1541026] smart account 3MuBakQdFAobmsHH371bKVYNed6yA9Y2Wfy > SELF 0.00000000 Waves

{ "type": 13, "id": "CqTNAzrYTqVVZfRaGpb624TCuEjB3ZwsBdMsj6o8i3CN", "fee": 1400000, "feeAssetId": null, "timestamp": 1621936161530, "version": 2, "chainId": 84, "sender": "3MuBakQdFAobmsHH371bKVYNed6yA9Y2Wfy", "senderPublicKey": "9BAE85H9Tsey8NGdpT5HxdVYHBCmY1prGiG1TSQJxnZe", "proofs": [ "5oF6XuUUeq2kxn5uYTmq7PAj5aFMur1RWK9ZAdtY8FyipfABV7QCRyuoUaQnH4rNHvgm2d99bXtqePzTK65NMdDL" ], "script": "base64:AAIEAAAAAAAAAAcIAhIDCgEIAAAABQEAAAAOZ2V0TnVtYmVyQnlLZXkAAAABAAAAA2tleQQAAAAGbnVtYmVyBAAAAAckbWF0Y2gwCQAEGgAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAADSW50BAAAAAFhBQAAAAckbWF0Y2gwBQAAAAFhAAAAAAAAAAAABQAAAAZudW1iZXIAAAAABE5PTkUCAAAABG5vbmUBAAAADmdldFN0cmluZ0J5S2V5AAAAAQAAAANrZXkEAAAABnN0cmluZwQAAAAHJG1hdGNoMAkABB0AAAACBQAAAAR0aGlzBQAAAANrZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAABlN0cmluZwQAAAABYQUAAAAHJG1hdGNoMAUAAAABYQUAAAAETk9ORQUAAAAGc3RyaW5nAQAAAA9nZXRLZXlVc2VyRW1haWwAAAABAAAABHVzZXIJAAEsAAAAAgkAASwAAAACAgAAAAV1c2VyXwUAAAAEdXNlcgIAAAAGX2VtYWlsAQAAABFnZXRWYWx1ZVVzZXJFbWFpbAAAAAEAAAAEdXNlcgkBAAAADmdldFN0cmluZ0J5S2V5AAAAAQkBAAAAD2dldEtleVVzZXJFbWFpbAAAAAEFAAAABHVzZXIAAAABAAAAAWkBAAAABnNpZ25VcAAAAAEAAAAFZW1haWwEAAAAEmN1cnJlbnRVc2VyQWRkcmVzcwkAAlgAAAABCAgFAAAAAWkAAAAGY2FsbGVyAAAABWJ5dGVzBAAAABBjdXJyZW50VXNlckVtYWlsCQEAAAAPZ2V0S2V5VXNlckVtYWlsAAAAAQUAAAASY3VycmVudFVzZXJBZGRyZXNzAwkBAAAAAiE9AAAAAgUAAAAQY3VycmVudFVzZXJFbWFpbAUAAAAETk9ORQkAAAIAAAABAgAAABN1c2VyIGFscmVhZHkgZXhpc3RzCQAETAAAAAIJAQAAAAtTdHJpbmdFbnRyeQAAAAIJAQAAAA9nZXRLZXlVc2VyRW1haWwAAAABBQAAABJjdXJyZW50VXNlckFkZHJlc3MFAAAABWVtYWlsBQAAAANuaWwAAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAACQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleXmHCW0=", "height": 1541026, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 73Yp1EKZ5Xt5AdMGc3zGjus6NtWDCiYozq7XTwHaLExM Next: DLBmJXK24o4Cp8tKu8vFgLT7g6mJH2kGtmZJLZcVkZhd Diff:
OldNewDifferences
3333
3434 @Callable(i)
3535 func signUp (email) = {
36- let currentUserAddres = toBase58String(i.caller.bytes)
37-[StringEntry(getKeyUserEmail(currentUserAddres), email)]
36+ let currentUserAddress = toBase58String(i.caller.bytes)
37+ let currentUserEmail = getKeyUserEmail(currentUserAddress)
38+ if ((currentUserEmail != NONE))
39+ then throw("user already exists")
40+ else [StringEntry(getKeyUserEmail(currentUserAddress), email)]
3841 }
3942
4043
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 4 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 func getNumberByKey (key) = {
55 let number = match getInteger(this, key) {
66 case a: Int =>
77 a
88 case _ =>
99 0
1010 }
1111 number
1212 }
1313
1414
1515 let NONE = "none"
1616
1717 func getStringByKey (key) = {
1818 let string = match getString(this, key) {
1919 case a: String =>
2020 a
2121 case _ =>
2222 NONE
2323 }
2424 string
2525 }
2626
2727
2828 func getKeyUserEmail (user) = (("user_" + user) + "_email")
2929
3030
3131 func getValueUserEmail (user) = getStringByKey(getKeyUserEmail(user))
3232
3333
3434 @Callable(i)
3535 func signUp (email) = {
36- let currentUserAddres = toBase58String(i.caller.bytes)
37-[StringEntry(getKeyUserEmail(currentUserAddres), email)]
36+ let currentUserAddress = toBase58String(i.caller.bytes)
37+ let currentUserEmail = getKeyUserEmail(currentUserAddress)
38+ if ((currentUserEmail != NONE))
39+ then throw("user already exists")
40+ else [StringEntry(getKeyUserEmail(currentUserAddress), email)]
3841 }
3942
4043
4144 @Verifier(tx)
4245 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
4346

github/deemru/w8io/169f3d6 
91.59 ms