tx · 4uHDb3EuvF2Rm3NezEQv6EdJNyRYCDQPcQFMtz6YxDB6

3MvJMBxdrVAf1nCHiarJcQVnKy91HhBKe6w:  -0.01400000 Waves

2019.11.18 17:52 [770710] smart account 3MvJMBxdrVAf1nCHiarJcQVnKy91HhBKe6w > SELF 0.00000000 Waves

{ "type": 13, "id": "4uHDb3EuvF2Rm3NezEQv6EdJNyRYCDQPcQFMtz6YxDB6", "fee": 1400000, "feeAssetId": null, "timestamp": 1574088627687, "version": 1, "sender": "3MvJMBxdrVAf1nCHiarJcQVnKy91HhBKe6w", "senderPublicKey": "99YVxEETpC8daMuVD1HFjz4KEx66SMyjjnCtNmptDa2u", "proofs": [ "3HBJ681dE2hbM52BvPZgRzEpapUgiyAp9ttdNnDzaMaduA3EPJfPKuabHBoYJ83VRPkwQG6UUWKoJ1abvj4JajPD" ], "script": "base64:AAIDAAAAAAAAAAgIARIECgIICAAAAAwBAAAAHGdldEV4dEtleUl0ZW1XaGl0ZUxpc3RTdGF0dXMAAAABAAAAB2FjY291bnQJAAEsAAAAAgIAAAAQdmVyaWZpZXJfc3RhdHVzXwUAAAAHYWNjb3VudAEAAAAeZ2V0RXh0VmFsdWVJdGVtV2hpdGVMaXN0U3RhdHVzAAAAAQAAAAZzdGF0dXMFAAAABnN0YXR1cwAAAAAIdmVyaWZpZXICAAAAIzNOQ0tvRlF4UmY3enNETmJpdkxGdzFvSjd5OHFKekxtRXM0AAAAABR0aGlzQWRkcmVzc1B1YmxpY0tleQEAAAAgeQ3CE9gMIb37oMo9b2d/nRpvVmKT4DiFAWcrnu2xIwIAAAAAC1dISVRFTElTVEVEAgAAAAtXSElURUxJU1RFRAAAAAALQkxBQ0tMSVNURUQCAAAAC0JMQUNLTElTVEVEAAAAAAdJTlZJVEVEAgAAAAdJTlZJVEVEAAAAABBJTlZJVEVETU9ERVJBVE9SAgAAABBJTlZJVEVETU9ERVJBVE9SAAAAAAxJTlZJVEVEQURNSU4CAAAADElOVklURURBRE1JTgAAAA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FXN0YXR1cyBub3QgcmVjb2duaXNlZAkBAAAACFdyaXRlU2V0AAAAAQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkBAAAAHGdldEV4dEtleUl0ZW1XaGl0ZUxpc3RTdGF0dXMAAAABBQAAAAdhY2NvdW50BQAAAAZzdGF0dXMFAAAAA25pbAAAAAEAAAABaQEAAAAGdmVyaWZ5AAAAAAQAAAAHJG1hdGNoMAUAAAABaQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAUU2V0U2NyaXB0VHJhbnNhY3Rpb24EAAAAAXMFAAAAByRtYXRjaDAJAAH0AAAAAwkAAZEAAAACCAUAAAABaQAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAFpAAAACWJvZHlCeXRlcwgFAAAAAWkAAAAPc2VuZGVyUHVibGljS2V5B6fFC5o=", "chainId": 84, "height": 770710, "spentComplexity": 0 } View: original | compacted Prev: 2u9aiPHfkxQk28ini5g15xLz7RpUmxAzb1PBfBioFv23 Next: none Diff:
OldNewDifferences
88
99
1010 let verifier = "3NCKoFQxRf7zsDNbivLFw1oJ7y8qJzLmEs4"
11+
12+let thisAddressPublicKey = base58'99YVxEETpC8daMuVD1HFjz4KEx66SMyjjnCtNmptDa2u'
1113
1214 let WHITELISTED = "WHITELISTED"
1315
5658 }
5759
5860
61+@Verifier(i)
62+func verify () = match i {
63+ case s: SetScriptTransaction =>
64+ sigVerify(i.proofs[0], i.bodyBytes, i.senderPublicKey)
65+ case _ =>
66+ false
67+}
68+
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 func getExtKeyItemWhiteListStatus (account) = ("verifier_status_" + account)
55
66
77 func getExtValueItemWhiteListStatus (status) = status
88
99
1010 let verifier = "3NCKoFQxRf7zsDNbivLFw1oJ7y8qJzLmEs4"
11+
12+let thisAddressPublicKey = base58'99YVxEETpC8daMuVD1HFjz4KEx66SMyjjnCtNmptDa2u'
1113
1214 let WHITELISTED = "WHITELISTED"
1315
1416 let BLACKLISTED = "BLACKLISTED"
1517
1618 let INVITED = "INVITED"
1719
1820 let INVITEDMODERATOR = "INVITEDMODERATOR"
1921
2022 let INVITEDADMIN = "INVITEDADMIN"
2123
2224 let SPENDINVITE = "SPEND_INVITE"
2325
2426 let ADMIN = "ADMIN"
2527
2628 let MODERATOR = "MODERATOR"
2729
2830 @Callable(i)
2931 func setstatus (account,status) = {
3032 let caller = toBase58String(i.caller.bytes)
3133 if (if ((caller != verifier))
3234 then if ((getExtValueItemWhiteListStatus(caller) != MODERATOR))
3335 then true
3436 else (getExtValueItemWhiteListStatus(caller) != ADMIN)
3537 else false)
3638 then throw("only Kolin ADMINS or MODERATORS can manage the whitelist")
3739 else if (if ((caller != verifier))
3840 then if (if (if (if (if (if (if ((status != WHITELISTED))
3941 then true
4042 else (status != BLACKLISTED))
4143 then true
4244 else (status != INVITED))
4345 then true
4446 else (status != INVITEDMODERATOR))
4547 then true
4648 else (status != INVITEDADMIN))
4749 then true
4850 else (status != MODERATOR))
4951 then true
5052 else (status != ADMIN))
5153 then true
5254 else (status != SPENDINVITE)
5355 else false)
5456 then throw("status not recognised")
5557 else WriteSet([DataEntry(getExtKeyItemWhiteListStatus(account), status)])
5658 }
5759
5860
61+@Verifier(i)
62+func verify () = match i {
63+ case s: SetScriptTransaction =>
64+ sigVerify(i.proofs[0], i.bodyBytes, i.senderPublicKey)
65+ case _ =>
66+ false
67+}
68+

github/deemru/w8io/026f985 
23.86 ms