tx · GSr64gv25i7N3qsYYALo5Z6sSchGMDZtScTdHnJghQvT

3MsFfxb9nMASroV8f9eugKrehzP41Tad4XJ:  -0.00200000 Waves

2024.09.24 00:02 [3296749] smart account 3MsFfxb9nMASroV8f9eugKrehzP41Tad4XJ > SELF 0.00000000 Waves

{ "type": 13, "id": "GSr64gv25i7N3qsYYALo5Z6sSchGMDZtScTdHnJghQvT", "fee": 200000, "feeAssetId": null, "timestamp": 1727125366376, "version": 2, "chainId": 84, "sender": "3MsFfxb9nMASroV8f9eugKrehzP41Tad4XJ", "senderPublicKey": "3mw2G5NHuzcbY5eky62YmA33z64g4FTuVRTLy6FvNp61", "proofs": [ "3gT3hUfPPtU51Fo55N4K2cXYVJJxttxibPkyvn1vxTiSdrcJAdxg5yjL4C36VmqdgxXQCgwvmjbbzxtVVJ1WHe4U" ], "script": "base64:AAIFAAAAAAAAABgIAhIECgIIARIECgIIARIDCgEIEgMKAQgAAAAFAQAAABB3cml0ZUNvbnN0U3RyaW5nAAAAAgAAAANrZXkAAAAFdmFsdWUDCQEAAAABIQAAAAEJAQAAAAlpc0RlZmluZWQAAAABCQAEHQAAAAIFAAAABHRoaXMFAAAAA2tleQkBAAAAC1N0cmluZ0VudHJ5AAAAAgUAAAADa2V5BQAAAAV2YWx1ZQkAAAIAAAABCQABLAAAAAICAAAAFWFscmVhZHkgaW5pdGlhbGl6ZWQ6IAUAAAADa2V5AQAAAAh3cml0ZUludAAAAAIAAAADa2V5AAAABXZhbHVlAwkAAGYAAAACAAAAAAAAAAAABQAAAAV2YWx1ZQkAAAIAAAABCQABLAAAAAIJAAEsAAAAAgkAASwAAAACAgAAABd3cml0aW5nIG5lZ2F0aXZlIHZhbHVlIAkAAaQAAAABBQAAAAV2YWx1ZQIAAAAJIGZvciBrZXkgBQAAAANrZXkJAQAAAAxJbnRlZ2VyRW50cnkAAAACBQAAAANrZXkFAAAABXZhbHVlAAAAABJjb25maWdBZGRyZXNzU3RvcmUCAAAABmNvbmZpZwAAAA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C0RlbGV0ZUVudHJ5AAAAAQUAAAADa2V5BQAAAANuaWwAAAABaQEAAAAEaW5pdAAAAAEAAAAGY29uZmlnCQAETAAAAAIJAQAAABB3cml0ZUNvbnN0U3RyaW5nAAAAAgUAAAASY29uZmlnQWRkcmVzc1N0b3JlBQAAAAZjb25maWcFAAAAA25pbAAAAAB+ZKjp", "height": 3296749, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: none Full:
OldNewDifferences
1-# no script
1+{-# STDLIB_VERSION 5 #-}
2+{-# SCRIPT_TYPE ACCOUNT #-}
3+{-# CONTENT_TYPE DAPP #-}
4+func writeConstString (key,value) = if (!(isDefined(getString(this, key))))
5+ then StringEntry(key, value)
6+ else throw(("already initialized: " + key))
7+
8+
9+func writeInt (key,value) = if ((0 > value))
10+ then throw(((("writing negative value " + toString(value)) + " for key ") + key))
11+ else IntegerEntry(key, value)
12+
13+
14+let configAddressStore = "config"
15+
16+let configAddress = valueOrErrorMessage(addressFromString(valueOrErrorMessage(getString(this, configAddressStore), "userdata: no config")), "userdata: invalid config address")
17+
18+let voting = valueOrErrorMessage(addressFromString(valueOrErrorMessage(getString(configAddress, "contract_voting"), "no contract_voting")), "invalid contract_voting")
19+
20+@Callable(i)
21+func write (key,value) = if ((i.caller != voting))
22+ then throw("denied")
23+ else [IntegerEntry(key, value)]
24+
25+
26+
27+@Callable(i)
28+func changeBy (key,delta) = if ((i.caller != voting))
29+ then throw("denied")
30+ else [writeInt(key, (valueOrElse(getInteger(key), 0) + delta))]
31+
32+
33+
34+@Callable(i)
35+func delete (key) = if ((i.caller != voting))
36+ then throw("denied")
37+ else [DeleteEntry(key)]
38+
39+
40+
41+@Callable(i)
42+func init (config) = [writeConstString(configAddressStore, config)]
43+
44+

github/deemru/w8io/169f3d6 
11.63 ms