tx · AL576tv4t5ZNJoETcS8Y7WPurMwY7jdvRdBsf3MqrZYd

3MsEYrugWRGMvdKBKChVCjg2qoKea8Ko9vY:  -0.00700000 Waves

2022.07.06 20:58 [2128157] smart account 3MsEYrugWRGMvdKBKChVCjg2qoKea8Ko9vY > SELF 0.00000000 Waves

{ "type": 13, "id": "AL576tv4t5ZNJoETcS8Y7WPurMwY7jdvRdBsf3MqrZYd", "fee": 700000, "feeAssetId": null, "timestamp": 1657130335010, "version": 2, "chainId": 84, "sender": "3MsEYrugWRGMvdKBKChVCjg2qoKea8Ko9vY", "senderPublicKey": "A8DvbFTEjyHFvpK57CmHu6QKczzymTB5sgqq8xxjNsXG", "proofs": [ "4Ub6qtjyMH863xKCktCP5HsNfMWzzc3CghojH3R1oWtpuJtzTTi61KiVyb3XFP9jyiyStgFkqEjqduihdUndceKp" ], "script": "base64:AAIFAAAAAAAAAAcIAhIDCgEIAAAABgAAAAADU0VQAgAAAAJfXwEAAAAVa2V5QmVuZWZpY2lhcnlBZGRyZXNzAAAAAAIAAAAdJXMlc19fY2ZnX19iZW5lZmljaWFyeUFkZHJlc3MBAAAAFmtleUNvbnN0cnVjdG9ySW50ZXJ2YWwAAAAAAgAAACElcyVzX19jZmdfX25vZGVDb250cnVjdG9ySW50ZXJ2YWwBAAAAE2tleUxhc3RVcGRhdGVIZWlnaHQAAAAAAgAAABUlc19fbGFzdFVwZGF0ZWRIZWlnaHQBAAAAE2tleVNjcmlwdFVwZGF0ZUhhc2gAAAAAAgAAABQlc19fc2NyaXB0VXBkYXRlSGFzaAAAAAAMbm9kZVJlZ2lzdHJ5CQEAAAARQGV4dHJOYXRpdmUoMTA2MikAAAABAgAAACMzTXNVOTM2YnJpcVEyWFpNcGtoV2RyVjhFc053bTVpQ3VSWQAAAAEAAAABaQEAAAALY29uc3RydWN0b3IAAAABAAAAF2JlbmVmaWNpYXJ5QWRkcmVzc1N0cjU4AwkBAAAAAiE9AAAAAgUAAAAEdGhpcwgFAAAAAWkAA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AAxub2RlUmVnaXN0cnkJAQAAABNrZXlTY3JpcHRVcGRhdGVIYXNoAAAAAAIAAAAABAAAAAthbGxvd0J5SGFzaAMJAQAAAAIhPQAAAAIFAAAAC2FsbG93ZWRIYXNoAgAAAAAJAAAAAAAAAgUAAAALYWxsb3dlZEhhc2gFAAAABGhhc2gHBAAAAAphbGxvd0J5U2lnCQAJxgAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleQMFAAAACmFsbG93QnlTaWcGBQAAAAthbGxvd0J5SGFzaAkAAAIAAAABAgAAAAtub3QgYWxsb3dlZNuVxGk=", "height": 2128157, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: EUwaWMp11KX9TWQUdwzhtStRNThrPS4Fd9TmD6KQ1JSa Next: B4Yy3ovpSn5jGaBUonzhQcxt7eEaXSVXAqjbfBVqihWe Diff:
OldNewDifferences
5454 then (allowedHash == hash)
5555 else false
5656 let allowBySig = sigVerify_32Kb(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
57- if (if (allowBySig)
57+ if (allowBySig)
5858 then true
59- else allowByHash)
60- then true
61- else throw(((("SetScriptTransaction - allowBySig=" + toString(allowBySig)) + " allowByHash=") + toString(allowByHash)))
59+ else allowByHash
6260 case _ =>
6361 throw("not allowed")
6462 }
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let SEP = "__"
55
66 func keyBeneficiaryAddress () = "%s%s__cfg__beneficiaryAddress"
77
88
99 func keyConstructorInterval () = "%s%s__cfg__nodeContructorInterval"
1010
1111
1212 func keyLastUpdateHeight () = "%s__lastUpdatedHeight"
1313
1414
1515 func keyScriptUpdateHash () = "%s__scriptUpdateHash"
1616
1717
1818 let nodeRegistry = addressFromStringValue("3MsU936briqQ2XZMpkhWdrV8EsNwm5iCuRY")
1919
2020 @Callable(i)
2121 func constructor (beneficiaryAddressStr58) = if ((this != i.caller))
2222 then throw("permissions denied")
2323 else {
2424 let beneficiaryAddress = addressFromStringValue(beneficiaryAddressStr58)
2525 if ((beneficiaryAddress == this))
2626 then throw("mining node address is not allowed as a beneficiaryAddress")
2727 else [StringEntry(keyBeneficiaryAddress(), toString(beneficiaryAddress)), IntegerEntry(keyLastUpdateHeight(), height)]
2828 }
2929
3030
3131 @Verifier(tx)
3232 func verify () = match tx {
3333 case inv: InvokeScriptTransaction =>
3434 if ((inv.fee > (5 * 100000)))
3535 then throw(("InvokeScriptTransaction - fee amount is greater than max allowed: " + toString(inv.fee)))
3636 else if (isDefined(inv.feeAssetId))
3737 then throw("InvokeScriptTransaction - only WAVES is allowed as feeAssetId")
3838 else if ((addressFromRecipient(inv.dApp) == nodeRegistry))
3939 then true
4040 else if ((addressFromRecipient(inv.dApp) == this))
4141 then {
4242 let lastUpdatedHeight = valueOrElse(getInteger(this, keyLastUpdateHeight()), 0)
4343 let constrInterval = valueOrElse(getInteger(nodeRegistry, keyConstructorInterval()), 43200)
4444 if ((constrInterval > (height - lastUpdatedHeight)))
4545 then throw("InvokeScriptTransaction - impossible to call constructor very often")
4646 else sigVerify_32Kb(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
4747 }
4848 else throw("InvokeScriptTransaction - invalid dapp address")
4949 case stx: SetScriptTransaction =>
5050 let scriptBytes = value(stx.script)
5151 let hash = toBase58String(keccak256_32Kb(blake2b256_32Kb(scriptBytes)))
5252 let allowedHash = valueOrElse(getString(nodeRegistry, keyScriptUpdateHash()), "")
5353 let allowByHash = if ((allowedHash != ""))
5454 then (allowedHash == hash)
5555 else false
5656 let allowBySig = sigVerify_32Kb(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
57- if (if (allowBySig)
57+ if (allowBySig)
5858 then true
59- else allowByHash)
60- then true
61- else throw(((("SetScriptTransaction - allowBySig=" + toString(allowBySig)) + " allowByHash=") + toString(allowByHash)))
59+ else allowByHash
6260 case _ =>
6361 throw("not allowed")
6462 }
6563

github/deemru/w8io/026f985 
34.25 ms