tx · 9gYrdjnaBTVxQNmMnZwFNCD6ahzLGH1phBApt8fUvQG2

3MqCAWYMD7rzKTLqjzyTHEUqjPxh4YhyXRE:  -0.01000000 Waves

2020.09.23 15:11 [1189933] smart account 3MqCAWYMD7rzKTLqjzyTHEUqjPxh4YhyXRE > SELF 0.00000000 Waves

{ "type": 13, "id": "9gYrdjnaBTVxQNmMnZwFNCD6ahzLGH1phBApt8fUvQG2", "fee": 1000000, "feeAssetId": null, "timestamp": 1600863181875, "version": 1, "sender": "3MqCAWYMD7rzKTLqjzyTHEUqjPxh4YhyXRE", "senderPublicKey": "3r1UNkCtRYxqf9iwyn9FL4ScokFsKfYLBk6FJ38RDSd5", "proofs": [ "5MPNwtjWacc9KPtj2Ri51Hwm4t1W9KeciLdGszRGovG8AACAUeemkBK2HDwHd7VA9yN6wLHKtd4Y5GaYkvP3dyNg" ], "script": "base64:AAIEAAAAAAAAAAgIAhIECgIBCAAAAAkAAAAAC2FkZHJlc3NCb29rCQEAAAAHQWRkcmVzcwAAAAEBAAAAGgFUVoHUeTQTO77iaMaO0CyN+LlydsBXbwHeAAAAABN3aGl0ZWxpc3RBZGRyZXNzS2V5AgAAABB3aGl0ZWxpc3RBZGRyZXNzAAAAABdkQXBwV2hpdGVsaXN0QWRkcmVzc0tleQIAAAAUZEFwcFdoaXRlbGlzdEFkZHJlc3MAAAAAB2Fzc2V0SWQBAAAAIHDawER3krJzbDwicWHgUul2gS5PidJ/0PedHkfZQ3KVAAAAABJvd25lckFkZHJlc3NTdHJpbmcCAAAAIzNNcUNBV1lNRDdyektUTHFqenlUSEVVcWpQeGg0WWh5WFJFAAAAAAN2ZXICAAAABTYuMC4wAQAAABJnZXRBZGRyZXNzRnJvbUJvb2sAAAABAAAAA2tleQQAAAAHJG1hdGNoMAkABB0AAAACBQAAAAthZGRyZXNzQm9vawUAAAADa2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAAZTdHJpbmcEAAAAAWEFAAAAByRtYXRjaDAJAQAA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SWQAAAAAAAAAAAEAAAAAAAAAAAAEAAAAC3BLZXk3U2lnbmVkAwkBAAAACWlzRGVmaW5lZAAAAAEJAAQaAAAAAgUAAAAJcEFkZHJlc3M3BQAAAAR0eElkAAAAAAAAAAABAAAAAAAAAAAABAAAAAtwS2V5OFNpZ25lZAMJAQAAAAlpc0RlZmluZWQAAAABCQAEGgAAAAIFAAAACXBBZGRyZXNzOAUAAAAEdHhJZAAAAAAAAAAAAQAAAAAAAAAAAAkAAGcAAAACCQAAZAAAAAIJAABkAAAAAgkAAGQAAAACCQAAZAAAAAIJAABkAAAAAgkAAGQAAAACCQAAZAAAAAIFAAAAC3BLZXkxU2lnbmVkBQAAAAtwS2V5MlNpZ25lZAUAAAALcEtleTNTaWduZWQFAAAAC3BLZXk0U2lnbmVkBQAAAAtwS2V5NVNpZ25lZAUAAAALcEtleTZTaWduZWQFAAAAC3BLZXk3U2lnbmVkBQAAAAtwS2V5OFNpZ25lZAAAAAAAAAAAAwc9PZdK", "chainId": 84, "height": 1189933, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: none Full:
OldNewDifferences
1-# no script
1+{-# STDLIB_VERSION 4 #-}
2+{-# SCRIPT_TYPE ACCOUNT #-}
3+{-# CONTENT_TYPE DAPP #-}
4+let addressBook = Address(base58'3MwoVRAPfC2NKuuYJKHVAVtUFhq8MyTEfQh')
5+
6+let whitelistAddressKey = "whitelistAddress"
7+
8+let dAppWhitelistAddressKey = "dAppWhitelistAddress"
9+
10+let assetId = base58'8bY8MAD1Fz6LFZtAmMoGoAdWGtA92WK3h4UtWwznwEbn'
11+
12+let ownerAddressString = "3MqCAWYMD7rzKTLqjzyTHEUqjPxh4YhyXRE"
13+
14+let ver = "6.0.0"
15+
16+func getAddressFromBook (key) = match getString(addressBook, key) {
17+ case a: String =>
18+ Address(fromBase58String(a))
19+ case _ =>
20+ throw("no key")
21+}
22+
23+
24+let whitelistAddress = getAddressFromBook(whitelistAddressKey)
25+
26+let dAppWhitelistAddress = getAddressFromBook(dAppWhitelistAddressKey)
27+
28+@Callable(i)
29+func reissueSecurityForAddress (quantity,address) = {
30+ let callerAddressString = toBase58String(i.caller.bytes)
31+ if (if ((callerAddressString != ownerAddressString))
32+ then (callerAddressString != toString(whitelistAddress))
33+ else false)
34+ then throw("#001 caller has no rights for this operation")
35+ else {
36+ let isAccountAllow = match getInteger(whitelistAddress, address) {
37+ case a: Int =>
38+ a
39+ case _ =>
40+ -255
41+ }
42+ let dAppStatus = match getInteger(dAppWhitelistAddress, address) {
43+ case a: Int =>
44+ a
45+ case _ =>
46+ -1000
47+ }
48+ if (if ((dAppStatus != -1000))
49+ then true
50+ else (isAccountAllow != -255))
51+ then {
52+ let currentKeyAddress = Address(fromBase58String(address))
53+ let balanceAmount = assetBalance(this, assetId)
54+ if ((balanceAmount >= quantity))
55+ then [ScriptTransfer(currentKeyAddress, quantity, assetId)]
56+ else [Reissue(assetId, (quantity - balanceAmount), true), ScriptTransfer(currentKeyAddress, quantity, assetId)]
57+ }
58+ else throw("#002 invalid recipient")
59+ }
60+ }
61+
62+
63+@Verifier(tx)
64+func verify () = match tx {
65+ case tx: SetAssetScriptTransaction|SetScriptTransaction =>
66+ let txId = toBase58String(tx.id)
67+ let pAddress1 = getAddressFromBook("pAddress1")
68+ let pAddress2 = getAddressFromBook("pAddress2")
69+ let pAddress3 = getAddressFromBook("pAddress3")
70+ let pAddress4 = getAddressFromBook("pAddress4")
71+ let pAddress5 = getAddressFromBook("pAddress5")
72+ let pAddress6 = getAddressFromBook("pAddress6")
73+ let pAddress7 = getAddressFromBook("pAddress7")
74+ let pAddress8 = getAddressFromBook("pAddress8")
75+ let pKey1Signed = if (isDefined(getInteger(pAddress1, txId)))
76+ then 1
77+ else 0
78+ let pKey2Signed = if (isDefined(getInteger(pAddress2, txId)))
79+ then 1
80+ else 0
81+ let pKey3Signed = if (isDefined(getInteger(pAddress3, txId)))
82+ then 1
83+ else 0
84+ let pKey4Signed = if (isDefined(getInteger(pAddress4, txId)))
85+ then 1
86+ else 0
87+ let pKey5Signed = if (isDefined(getInteger(pAddress5, txId)))
88+ then 1
89+ else 0
90+ let pKey6Signed = if (isDefined(getInteger(pAddress6, txId)))
91+ then 1
92+ else 0
93+ let pKey7Signed = if (isDefined(getInteger(pAddress7, txId)))
94+ then 1
95+ else 0
96+ let pKey8Signed = if (isDefined(getInteger(pAddress8, txId)))
97+ then 1
98+ else 0
99+ ((((((((pKey1Signed + pKey2Signed) + pKey3Signed) + pKey4Signed) + pKey5Signed) + pKey6Signed) + pKey7Signed) + pKey8Signed) >= 3)
100+ case _ =>
101+ false
102+}
103+

github/deemru/w8io/026f985 
13.74 ms