tx · EdZzkw8uMv8qFUeMauR77Wjpigy2yaMCwfLivVLUeTHz

3MqxNQues3HH3kBjuzTSnJ7UKwmS9hgnxxx:  -0.01400000 Waves

2022.09.04 21:34 [2214743] smart account 3MqxNQues3HH3kBjuzTSnJ7UKwmS9hgnxxx > SELF 0.00000000 Waves

{ "type": 13, "id": "EdZzkw8uMv8qFUeMauR77Wjpigy2yaMCwfLivVLUeTHz", "fee": 1400000, "feeAssetId": null, "timestamp": 1662316443876, "version": 2, "chainId": 84, "sender": "3MqxNQues3HH3kBjuzTSnJ7UKwmS9hgnxxx", "senderPublicKey": "3karvhVe3LgRMXprezaPpdeYknh9ju1rETVV3zdunQ1p", "proofs": [ "3Lxy6FfWKqihNGodeydaaRD5iTdbjP4WVGuQHhKihn6rYuTyuTsv9hU1NdGgd1o8zV4wVTKNodjVB2tvJtNRmT8D" ], "script": "base64:AAIEAAAAAAAAAAcIAhIDCgEIAAAAAQAAAAALQ09ERUFzc2V0SUQBAAAAIAhlhLcP8IpqGvPiaOguCJAkw9MnWAPNLPYuXgvf2hWkAAAAAQAAAAFpAQAAABBSZWdpc3RlclVzZXJOYW1lAAAAAQAAAAhVc2VyTmFtZQQAAAAKY3VycmVudEtleQkAAlgAAAABCAgFAAAAAWkAAAAGY2FsbGVyAAAABWJ5dGVzBAAAAANwbXQDCQAAAAAAAAIJAAGQAAAAAQgFAAAAAWkAAAAIcGF5bWVudHMAAAAAAAAAAAEJAAGRAAAAAggFAAAAAWkAAAAIcGF5bWVudHMAAAAAAAAAAAAJAAACAAAAAQkAASwAAAACCQACWAAAAAEFAAAAC0NPREVBc3NldElEAgAAACcgVG9rZW4gaXMgcmVxdWlyZWQgYXMgQXR0YWNoZWQgcGF5bWVudC4EAAAAC2NoZWNrc2VyaWVzCQAEHQAAAAIFAAAABHRoaXMFAAAACFVzZXJOYW1lAwkAAGYAAAACAAAAAAAAAAADCQABMQAAAAEFAAAACFVzZXJOYW1lCQAAAgAAAAECAAAAJ0Nob29zZSBhIFVuaXF1ZSBVc2VyTmFtZSBhYm92ZSAzIENoYXJzLgMJAQAAAAIhPQAAAAIIBQAAAANwbXQAAAAHYXNzZXRJZAUAAAALQ09ERUFzc2V0SUQJAAACAAAAAQkAASwAAAACAgAAACNXcm9uZyBBc3NldCBBdHRhY2hlZCBwbGVhc2UgQXR0YWNoIAkAAlgAAAABBQAAAAtDT0RFQXNzZXRJRAMJAAAAAAAAAgUAAAALY2hlY2tzZXJpZXMFAAAACFVzZXJOYW1lCQAAAgAAAAECAAAAZVVzZXIgTmFtZSBBbHJlYWR5IEV4aXN0IG9yIFRha2VuLiBDaG9vc2UgQW5vdGhlciBVbmlxdWUgVXNlciBOYW1lIG9yIENob29zZSBSZWZpbGwgdG8gcmVmaWxsIGFjY291bnQuAwkAAGYAAAACAAAAAAA7msoACAUAAAADcG10AAAABmFtb3VudAkAAAIAAAABCQABLAAAAAIJAAEsAAAAAgIAAAAfUGxlYXNlIEF0dGFjaCBNaW5pbXVtIDEwIENPREUgWwkAAlgAAAABBQAAAAtDT0RFQXNzZXRJRAIAAAABXQkABEwAAAACCQEAAAALU3RyaW5nRW50cnkAAAACBQAAAAhVc2VyTmFtZQUAAAAIVXNlck5hbWUFAAAAA25pbAAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5D42BKQ==", "height": 2214743, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 5poWSEu6dAdXNgfMsV5ud82jUttzKg3f2LxsyE5sbB3g Next: 2iLEZ4by53u7JU1F578DKtrr6CiAc2F9hbKTBo1QCa1t Diff:
OldNewDifferences
11 {-# STDLIB_VERSION 4 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-let ChatAssetID = base58'Zn3cLHW7aAVPm5aACcTjvg7e7iEy2cKDtbowok5qa9H'
4+let CODEAssetID = base58'Zn3cLHW7aAVPm5aACcTjvg7e7iEy2cKDtbowok5qa9H'
55
66 @Callable(i)
7-func RegisterUserName (UserName,UserDescription) = {
7+func RegisterUserName (UserName) = {
88 let currentKey = toBase58String(i.caller.bytes)
99 let pmt = if ((size(i.payments) == 1))
1010 then i.payments[0]
11- else throw((toBase58String(ChatAssetID) + " Token is required as Attached payment."))
12- let checkseries = getString(this, ("UserName_" + UserName))
11+ else throw((toBase58String(CODEAssetID) + " Token is required as Attached payment."))
12+ let checkseries = getString(this, UserName)
1313 if ((3 > size(UserName)))
1414 then throw("Choose a Unique UserName above 3 Chars.")
15- else if ((pmt.assetId != ChatAssetID))
16- then throw(("Wrong Asset Attached please Attach " + toBase58String(ChatAssetID)))
15+ else if ((pmt.assetId != CODEAssetID))
16+ then throw(("Wrong Asset Attached please Attach " + toBase58String(CODEAssetID)))
1717 else if ((checkseries == UserName))
18- then throw("User Name Already Exist or Taken. Choose Another Unique User Name.")
19- else if ((1000000 != pmt.amount))
20- then throw(("Please Attach Exact Amount = 1 " + toBase58String(ChatAssetID)))
21- else [StringEntry(("UserName_" + UserName), UserName), StringEntry(("UserDescription_" + UserName), UserDescription), StringEntry(("UserAddress_" + UserName), currentKey), StringEntry(("Plan_" + UserName), "Basic"), IntegerEntry(("Account_Creation_TimeStamp" + UserName), lastBlock.timestamp), IntegerEntry(("Last_Message_Timestamp" + UserName), lastBlock.timestamp), IntegerEntry(("MessageCounter_" + UserName), 0)]
18+ then throw("User Name Already Exist or Taken. Choose Another Unique User Name or Choose Refill to refill account.")
19+ else if ((1000000000 > pmt.amount))
20+ then throw((("Please Attach Minimum 10 CODE [" + toBase58String(CODEAssetID)) + "]"))
21+ else [StringEntry(UserName, UserName)]
2222 }
2323
2424
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 4 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-let ChatAssetID = base58'Zn3cLHW7aAVPm5aACcTjvg7e7iEy2cKDtbowok5qa9H'
4+let CODEAssetID = base58'Zn3cLHW7aAVPm5aACcTjvg7e7iEy2cKDtbowok5qa9H'
55
66 @Callable(i)
7-func RegisterUserName (UserName,UserDescription) = {
7+func RegisterUserName (UserName) = {
88 let currentKey = toBase58String(i.caller.bytes)
99 let pmt = if ((size(i.payments) == 1))
1010 then i.payments[0]
11- else throw((toBase58String(ChatAssetID) + " Token is required as Attached payment."))
12- let checkseries = getString(this, ("UserName_" + UserName))
11+ else throw((toBase58String(CODEAssetID) + " Token is required as Attached payment."))
12+ let checkseries = getString(this, UserName)
1313 if ((3 > size(UserName)))
1414 then throw("Choose a Unique UserName above 3 Chars.")
15- else if ((pmt.assetId != ChatAssetID))
16- then throw(("Wrong Asset Attached please Attach " + toBase58String(ChatAssetID)))
15+ else if ((pmt.assetId != CODEAssetID))
16+ then throw(("Wrong Asset Attached please Attach " + toBase58String(CODEAssetID)))
1717 else if ((checkseries == UserName))
18- then throw("User Name Already Exist or Taken. Choose Another Unique User Name.")
19- else if ((1000000 != pmt.amount))
20- then throw(("Please Attach Exact Amount = 1 " + toBase58String(ChatAssetID)))
21- else [StringEntry(("UserName_" + UserName), UserName), StringEntry(("UserDescription_" + UserName), UserDescription), StringEntry(("UserAddress_" + UserName), currentKey), StringEntry(("Plan_" + UserName), "Basic"), IntegerEntry(("Account_Creation_TimeStamp" + UserName), lastBlock.timestamp), IntegerEntry(("Last_Message_Timestamp" + UserName), lastBlock.timestamp), IntegerEntry(("MessageCounter_" + UserName), 0)]
18+ then throw("User Name Already Exist or Taken. Choose Another Unique User Name or Choose Refill to refill account.")
19+ else if ((1000000000 > pmt.amount))
20+ then throw((("Please Attach Minimum 10 CODE [" + toBase58String(CODEAssetID)) + "]"))
21+ else [StringEntry(UserName, UserName)]
2222 }
2323
2424
2525 @Verifier(tx)
2626 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
2727

github/deemru/w8io/169f3d6 
30.69 ms