tx · DsBjrbQEoTGRLWoNsAeSSyXKKh9XvkR18hGUHDcfpPmg 3NCHwk1XNSSKw5Z1HVNn7JbrTFQ7tDvdMpD: -0.00100000 Waves 2024.10.03 22:28 [3311091] smart account 3NCHwk1XNSSKw5Z1HVNn7JbrTFQ7tDvdMpD > SELF 0.00000000 Waves
{ "type": 13, "id": "DsBjrbQEoTGRLWoNsAeSSyXKKh9XvkR18hGUHDcfpPmg", "fee": 100000, "feeAssetId": null, "timestamp": 1727983816171, "version": 2, "chainId": 84, "sender": "3NCHwk1XNSSKw5Z1HVNn7JbrTFQ7tDvdMpD", "senderPublicKey": "ASLFUeTtV1bRFj3zKedAkvnnWabLkGcRPGXFgqWyuw2T", "proofs": [ "3uLidhrwoc7A4TNGM6arTHYZpuGLHFuKU3jVj6M9DBiDAjLcu8eP3fDtUCgEdpUniCAscPFZzTCqu3yWaPesVxp5" ], "script": "base64:BgIPCAISBgoECAgEARIDCgEIBAEQd3JpdGVDb25zdFN0cmluZwIDa2V5BXZhbHVlAwkBASEBCQEJaXNEZWZpbmVkAQkAnQgCBQR0aGlzBQNrZXkJAQtTdHJpbmdFbnRyeQIFA2tleQUFdmFsdWUJAAIBCQCsAgICFWFscmVhZHkgaW5pdGlhbGl6ZWQ6IAUDa2V5ABJjb25maWdBZGRyZXNzU3RvcmUCBmNvbmZpZwAGY29uZmlnCQETdmFsdWVPckVycm9yTWVzc2FnZQIJAKYIAQkBE3ZhbHVlT3JFcnJvck1lc3NhZ2UCCQCdCAIFBHRoaXMFEmNvbmZpZ0FkZHJlc3NTdG9yZQIhcmVzdWx0czogY29uZmlnIGFkZHJlc3Mgbm90IGZvdW5kAh9yZXN1bHRzOiBpbnZhbGlkIGNvbmZpZyBhZGRyZXNzAAZ2b3RpbmcJARN2YWx1ZU9yRXJyb3JNZXNzYWdlAgkApggBCQETdmFsdWVPckVycm9yTWVzc2FnZQIJAJ0IAgUGY29uZmlnAg9jb250cmFjdF92b3RpbmcCG3Jlc3VsdHM6IG5vIGNvbnRyYWN0X3ZvdGluZwIgcmVzdWx0czogaW52YWxpZCBjb250cmFjdF92b3RpbmcCAWkBCXNldFJlc3VsdAQHYWRkcmVzcwR0eElkB3N1Y2NlZWQPYnJvYWRjYXN0SGVpZ2h0AwkBAiE9AggFAWkGY2FsbGVyBQZ2b3RpbmcJAAIBAgZkZW5pZWQEBXN0b3JlCQCsAgIJAKwCAgkArAICAhlwcm9wb3NhbF9hbGxvd19icm9hZGNhc3RfBQdhZGRyZXNzAgFfBQR0eElkAwUHc3VjY2VlZAkAzAgCCQEMSW50ZWdlckVudHJ5AgUFc3RvcmUFD2Jyb2FkY2FzdEhlaWdodAUDbmlsCQDMCAIJAQtEZWxldGVFbnRyeQEFBXN0b3JlBQNuaWwBaQEEaW5pdAEEY29uZgkAzAgCCQEQd3JpdGVDb25zdFN0cmluZwIFEmNvbmZpZ0FkZHJlc3NTdG9yZQUEY29uZgUDbmlsAQJ0eAEGdmVyaWZ5AAQCaWQJANgEAQgFAnR4AmlkCQBnAgUGaGVpZ2h0CQERQGV4dHJOYXRpdmUoMTA1MCkCBQR0aGlzCQCsAgIJAKwCAgkArAICAhlwcm9wb3NhbF9hbGxvd19icm9hZGNhc3RfCQClCAEFBHRoaXMCAV8FAmlk88+Ewg==", "height": 3311091, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: none Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 6 #-} | |
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 | + | let configAddressStore = "config" | |
10 | + | ||
11 | + | let config = valueOrErrorMessage(addressFromString(valueOrErrorMessage(getString(this, configAddressStore), "results: config address not found")), "results: invalid config address") | |
12 | + | ||
13 | + | let voting = valueOrErrorMessage(addressFromString(valueOrErrorMessage(getString(config, "contract_voting"), "results: no contract_voting")), "results: invalid contract_voting") | |
14 | + | ||
15 | + | @Callable(i) | |
16 | + | func setResult (address,txId,succeed,broadcastHeight) = if ((i.caller != voting)) | |
17 | + | then throw("denied") | |
18 | + | else { | |
19 | + | let store = ((("proposal_allow_broadcast_" + address) + "_") + txId) | |
20 | + | if (succeed) | |
21 | + | then [IntegerEntry(store, broadcastHeight)] | |
22 | + | else [DeleteEntry(store)] | |
23 | + | } | |
24 | + | ||
25 | + | ||
26 | + | ||
27 | + | @Callable(i) | |
28 | + | func init (conf) = [writeConstString(configAddressStore, conf)] | |
29 | + | ||
30 | + | ||
31 | + | @Verifier(tx) | |
32 | + | func verify () = { | |
33 | + | let id = toBase58String(tx.id) | |
34 | + | (height >= getIntegerValue(this, ((("proposal_allow_broadcast_" + toString(this)) + "_") + id))) | |
35 | + | } | |
36 | + |
github/deemru/w8io/026f985 12.02 ms ◑