tx · GghJit96tsmPGhZ8yEziYMEa9vc67p8rrygChQZwCvQ8

3N4E8KG2AUwgX2Y9xdYYsD9iv55VME4twvY:  -0.05000000 Waves

2023.10.06 13:42 [2786652] smart account 3N4E8KG2AUwgX2Y9xdYYsD9iv55VME4twvY > SELF 0.00000000 Waves

{ "type": 13, "id": "GghJit96tsmPGhZ8yEziYMEa9vc67p8rrygChQZwCvQ8", "fee": 5000000, "feeAssetId": null, "timestamp": 1696588927098, "version": 1, "sender": "3N4E8KG2AUwgX2Y9xdYYsD9iv55VME4twvY", "senderPublicKey": "4ebpsPeeDUa3KEre4qF2K3ZgDs4iZMRVQDYRqw242SLM", "proofs": [ "4WMMaCcBpJzxvSzvzb8mAkoAG86phmRQBaj3LNSwSve4ij3LjepqpLW4poBYL9pUZpRyZTAct6QBM3ApQ2SAJERj" ], "script": "base64:BgIPCAISAwoBCBIGCgQICAQBBQASY29uZmlnQWRkcmVzc1N0b3JlAgZjb25maWcADWNvbmZpZ0FkZHJlc3MJARN2YWx1ZU9yRXJyb3JNZXNzYWdlAgkApggBCQETdmFsdWVPckVycm9yTWVzc2FnZQIJAJ0IAgUEdGhpcwUSY29uZmlnQWRkcmVzc1N0b3JlAid2b3RpbmctcmVzdWx0OiBjb25maWcgYWRkcmVzcyBub3QgZm91bmQCFmludmFsaWQgY29uZmlnIGFkZHJlc3MBEHdyaXRlQ29uc3RTdHJpbmcCA2tleQV2YWx1ZQMJAQEhAQkBCWlzRGVmaW5lZAEJAJ0IAgUEdGhpcwUDa2V5CQELU3RyaW5nRW50cnkCBQNrZXkFBXZhbHVlCQACAQkArAICAhVhbHJlYWR5IGluaXRpYWxpemVkOiAFA2tleQAWY2hpbGRyZW5Wb3RpbmdDb250cmFjdAkBE3ZhbHVlT3JFcnJvck1lc3NhZ2UCCQCmCAEJARN2YWx1ZU9yRXJyb3JNZXNzYWdlAgkAnQgCBQ1jb25maWdBZGRyZXNzAhhjb250cmFjdF9jaGlsZHJlbl92b3RpbmcCG25vI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90aW5nCQELdmFsdWVPckVsc2UCCQCbCAIFBHRoaXMJAKwCAgkArAICCQCsAgICGXByb3Bvc2FsX2FsbG93X2Jyb2FkY2FzdF8JAKUIAQUEdGhpcwIBXwUCaWQHAwkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAgFAnR4D3NlbmRlclB1YmxpY0tleQYFCGJ5Vm90aW5nIfr7Qg==", "chainId": 84, "height": 2786652, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: none Full:
OldNewDifferences
1-# no script
1+{-# STDLIB_VERSION 6 #-}
2+{-# SCRIPT_TYPE ACCOUNT #-}
3+{-# CONTENT_TYPE DAPP #-}
4+let configAddressStore = "config"
5+
6+let configAddress = valueOrErrorMessage(addressFromString(valueOrErrorMessage(getString(this, configAddressStore), "voting-result: config address not found")), "invalid config address")
7+
8+func writeConstString (key,value) = if (!(isDefined(getString(this, key))))
9+ then StringEntry(key, value)
10+ else throw(("already initialized: " + key))
11+
12+
13+let childrenVotingContract = valueOrErrorMessage(addressFromString(valueOrErrorMessage(getString(configAddress, "contract_children_voting"), "no contract_children_voting")), "invalid contract_children_voting")
14+
15+let motherVotingContract = valueOrErrorMessage(addressFromString(valueOrErrorMessage(getString(configAddress, "contract_voting"), "no contract_voting")), "invalid contract_voting")
16+
17+@Callable(i)
18+func init (conf) = [writeConstString(configAddressStore, conf)]
19+
20+
21+
22+@Callable(i)
23+func setResult (address,txId,succeed,broadcastHeight) = if (if ((i.caller != motherVotingContract))
24+ then (i.caller != childrenVotingContract)
25+ else false)
26+ then throw("only voting contract can call this method")
27+ else if (!(valueOrElse(getBoolean(this, ("allowed_child_voting_" + address)), true)))
28+ then throw(("child voting is not allowed for address " + address))
29+ else {
30+ let store = ((("proposal_allow_broadcast_" + address) + "_") + txId)
31+ if (succeed)
32+ then [IntegerEntry(store, broadcastHeight)]
33+ else [DeleteEntry(store)]
34+ }
35+
36+
37+@Verifier(tx)
38+func verify () = {
39+ let id = toBase58String(tx.id)
40+ let byVoting = valueOrElse(getBoolean(this, ((("proposal_allow_broadcast_" + toString(this)) + "_") + id)), false)
41+ if (sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey))
42+ then true
43+ else byVoting
44+ }
45+

github/deemru/w8io/169f3d6 
16.12 ms