tx · skEoY2JESkktpwLgVhp9NwhP8yZHdrRZeZQMR7wpTA5

3MrKteLMcQF3HoJ51VczfsFhse7pNNqBcXT:  -0.01000000 Waves

2020.09.23 16:21 [1190001] smart account 3MrKteLMcQF3HoJ51VczfsFhse7pNNqBcXT > SELF 0.00000000 Waves

{ "type": 13, "id": "skEoY2JESkktpwLgVhp9NwhP8yZHdrRZeZQMR7wpTA5", "fee": 1000000, "feeAssetId": null, "timestamp": 1600867299982, "version": 1, "sender": "3MrKteLMcQF3HoJ51VczfsFhse7pNNqBcXT", "senderPublicKey": "DwGZEuw5oz5e9TCbe5YiyvoR6XS8QtKjNxJBsKr2cQFF", "proofs": [ "hWN432FJtSAr1SUQDhDfeAVKBJo9SpNyGAbKECZive9ffvJYXQWz6NdWpLUvYn94zHUBoyNiGrTf1xE2Zq8Wvxk" ], "script": "base64:AAIEAAAAAAAAAAgIAhIECgIBCAAAAAkAAAAAC2FkZHJlc3NCb29rCQEAAAAHQWRkcmVzcwAAAAEBAAAAGgFUVoHUeTQTO77iaMaO0CyN+LlydsBXbwHeAAAAABN3aGl0ZWxpc3RBZGRyZXNzS2V5AgAAABB3aGl0ZWxpc3RBZGRyZXNzAAAAABdkQXBwV2hpdGVsaXN0QWRkcmVzc0tleQIAAAAUZEFwcFdoaXRlbGlzdEFkZHJlc3MAAAAAB2Fzc2V0SWQBAAAAIDLJZt343fg1wzdahtr4xlsh6lLv1g+sTPG5SJxLgE0yAAAAABJvd25lckFkZHJlc3NTdHJpbmcCAAAAIzNNckt0ZUxNY1FGM0hvSjUxVmN6ZnNGaHNlN3BOTnFCY1hUAAAAAAN2ZXICAAAABTYuMC4wAQAAABJnZXRBZGRyZXNzRnJvbUJvb2sAAAABAAAAA2tleQQAAAAHJG1hdGNoMAkABB0AAAACBQAAAAthZGRyZXNzQm9vawUAAAADa2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAAZTdHJpbmcEAAAAAWEFAAAAByRtYXRjaDAJAQAAAAdBZGRy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R0eElkAAAAAAAAAAABAAAAAAAAAAAABAAAAAtwS2V5N1NpZ25lZAMJAQAAAAlpc0RlZmluZWQAAAABCQAEGgAAAAIFAAAACXBBZGRyZXNzNwUAAAAEdHhJZAAAAAAAAAAAAQAAAAAAAAAAAAQAAAALcEtleThTaWduZWQDCQEAAAAJaXNEZWZpbmVkAAAAAQkABBoAAAACBQAAAAlwQWRkcmVzczgFAAAABHR4SWQAAAAAAAAAAAEAAAAAAAAAAAAJAABnAAAAAgkAAGQAAAACCQAAZAAAAAIJAABkAAAAAgkAAGQAAAACCQAAZAAAAAIJAABkAAAAAgkAAGQAAAACBQAAAAtwS2V5MVNpZ25lZAUAAAALcEtleTJTaWduZWQFAAAAC3BLZXkzU2lnbmVkBQAAAAtwS2V5NFNpZ25lZAUAAAALcEtleTVTaWduZWQFAAAAC3BLZXk2U2lnbmVkBQAAAAtwS2V5N1NpZ25lZAUAAAALcEtleThTaWduZWQAAAAAAAAAAAMHY29Umg==", "chainId": 84, "height": 1190001, "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'4RFWL7kkSyXfMy1SbJBxTdgh4b8c9Zhor45eWcuPZNKB'
11+
12+let ownerAddressString = "3MrKteLMcQF3HoJ51VczfsFhse7pNNqBcXT"
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(dAppWhitelistAddress))
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 
15.82 ms