tx · HCVaCRP2XbP9t2JFuvmW5wJx2KZgUxLTFmPdwx442sz

3N5NY2v5wdKQJbCvQA5o5hSihn7t7wYZ496:  -0.01000000 Waves

2024.12.16 21:42 [3417483] smart account 3N5NY2v5wdKQJbCvQA5o5hSihn7t7wYZ496 > SELF 0.00000000 Waves

{ "type": 13, "id": "HCVaCRP2XbP9t2JFuvmW5wJx2KZgUxLTFmPdwx442sz", "fee": 1000000, "feeAssetId": null, "timestamp": 1734374554532, "version": 2, "chainId": 84, "sender": "3N5NY2v5wdKQJbCvQA5o5hSihn7t7wYZ496", "senderPublicKey": "8Ti3dhEToApephiZ47QJeuQX3UYifveNLPQjNstsLho9", "proofs": [ "5HC7ZT8yxZF4NPmAyFanZeKW6noKCVhtQ5QDPTNadSDH1o9nwXux9VRBwRC8Em4WGoiFqDLd8W3HWczhETuyYGGu" ], "script": "base64:AAIFAAAAAAAAABMIAhIFCgMICAgSAwoBCBIDCgEIAAAAAwAAAAAMYWRtaW5BZGRyZXNzCQEAAAAHQWRkcmVzcwAAAAEBAAAAGgFUCqHeMHrxZR0XUx5cVy0kBbMbRdCBEe7XAAAAAAtkQXBwQWRkcmVzcwkBAAAAB0FkZHJlc3MAAAABAQAAABoBVI0VU3jZ1UKUxwxbUFugfo26NZ5ZKhlX8AEAAAANc2VhcmNoRm9yVXNlcgAAAAEAAAAHYWRkcmVzcwQAAAAEdXNlcgQAAAAHJG1hdGNoMAkABCIAAAABBQAAAAdhZGRyZXNzAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAAZTdHJpbmcEAAAAAXMFAAAAByRtYXRjaDAFAAAAAXMCAAAAB05vIFVzZXIFAAAABHVzZXIAAAADAAAAAWkBAAAAD3JlZ2lzdGVyQWNjb3VudAAAAAMAAAAHYWRkcmVzcwAAAARyb2xlAAAABG5hbWUDCQEAAAACIT0AAAACCAUAAAABaQAAAAZjYWxsZXIFAAAADGFkbWluQWRkcmVzcwkAAAIAAAABAgAAACRPbmx5IHRoZSBhZG1pbiBjYW4gcmVnaXN0ZXIgYWNjb3VudHMJAARMAAAAAgkBAAAAC1N0cmluZ0VudHJ5AAAAAgUAAAAHYWRkcmVzcwUAAAAEcm9sZQkABEwAAAACCQEAAAALU3RyaW5nRW50cnkAAAACCQABLAAAAAIFAAAAB2FkZHJlc3MCAAAABV9uYW1lBQAAAARuYW1lBQAAAANuaWwAAAABaQEAAAANZGVsZXRlQWNjb3VudAAAAAEAAAAHYWRkcmVzcwMJAQAAAAIhPQAAAAIIBQAAAAFpAAAABmNhbGxlcgUAAAAMYWRtaW5BZGRyZXNzCQAAAgAAAAECAAAAIk9ubHkgdGhlIGFkbWluIGNhbiBkZWxldGUgYWNjb3VudHMJAARMAAAAAgkBAAAAC0RlbGV0ZUVudHJ5AAAAAQUAAAAHYWRkcmVzcwUAAAADbmlsAAAAAWkBAAAACHNhdmVEYXRhAAAAAQAAAAt0ZW1wZXJhdHVyZQQAAAAGY2FsbGVyCAUAAAABaQAAAAZjYWxsZXIEAAAABHVzZXIJAQAAAA1zZWFyY2hGb3JVc2VyAAAAAQkAAlgAAAABCAUAAAAGY2FsbGVyAAAABWJ5dGVzAwkAAAAAAAACBQAAAAR1c2VyAgAAAAdObyBVc2VyCQAAAgAAAAECAAAAEVVzZXIgbm90IGVsaWdpYmxlBAAAAApwYXJhbWV0ZXJzCQAETAAAAAIFAAAAC3RlbXBlcmF0dXJlBQAAAANuaWwEAAAACmludm9rZVRhc2sJAAP8AAAABAUAAAALZEFwcEFkZHJlc3MCAAAACFNhdmVEYXRhBQAAAApwYXJhbWV0ZXJzBQAAAANuaWwDCQEAAAACIT0AAAACBQAAAAppbnZva2VUYXNrBQAAAAppbnZva2VUYXNrCQAAAgAAAAECAAAAJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgUAAAADbmlsAAAAAODPdB4=", "height": 3417483, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: J5WcWLczipdooSDvjoTtcs8qaFosiuX4XtFsEsvJ428o Next: Hpcr5pGGPGaDEXvaTNRu3vsLepcC3MjTk1FhPFz7cEV2 Diff:
OldNewDifferences
1717
1818
1919 @Callable(i)
20-func registerAccount (address,role) = if ((i.caller != adminAddress))
20+func registerAccount (address,role,name) = if ((i.caller != adminAddress))
2121 then throw("Only the admin can register accounts")
22- else [StringEntry(address, role)]
22+ else [StringEntry(address, role), StringEntry((address + "_name"), name)]
2323
2424
2525
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let adminAddress = Address(base58'3MptJSctbAkp5fddvpQmWYjjKrSoim6dL38')
55
66 let dAppAddress = Address(base58'3N2n4bjG8CjdKiwLPyp3hBM4MDJ3XwMZR5h')
77
88 func searchForUser (address) = {
99 let user = match getString(address) {
1010 case s: String =>
1111 s
1212 case _ =>
1313 "No User"
1414 }
1515 user
1616 }
1717
1818
1919 @Callable(i)
20-func registerAccount (address,role) = if ((i.caller != adminAddress))
20+func registerAccount (address,role,name) = if ((i.caller != adminAddress))
2121 then throw("Only the admin can register accounts")
22- else [StringEntry(address, role)]
22+ else [StringEntry(address, role), StringEntry((address + "_name"), name)]
2323
2424
2525
2626 @Callable(i)
2727 func deleteAccount (address) = if ((i.caller != adminAddress))
2828 then throw("Only the admin can delete accounts")
2929 else [DeleteEntry(address)]
3030
3131
3232
3333 @Callable(i)
3434 func saveData (temperature) = {
3535 let caller = i.caller
3636 let user = searchForUser(toBase58String(caller.bytes))
3737 if ((user == "No User"))
3838 then throw("User not eligible")
3939 else {
4040 let parameters = [temperature]
4141 let invokeTask = invoke(dAppAddress, "SaveData", parameters, nil)
4242 if ((invokeTask != invokeTask))
4343 then throw("Strict value is not equal to itself.")
4444 else nil
4545 }
4646 }
4747
4848

github/deemru/w8io/169f3d6 
38.34 ms