tx · DEx6fdt6EWm32GqRFHAzAjmkCEGvBvvgpBuPVEfGxSp2

3N1SPvLZgv6FMfe5WNUtnPzt3okYxcJhYnR:  -0.01000000 Waves

2019.12.16 16:07 [811486] smart account 3N1SPvLZgv6FMfe5WNUtnPzt3okYxcJhYnR > SELF 0.00000000 Waves

{ "type": 13, "id": "DEx6fdt6EWm32GqRFHAzAjmkCEGvBvvgpBuPVEfGxSp2", "fee": 1000000, "feeAssetId": null, "timestamp": 1576501223464, "version": 1, "sender": "3N1SPvLZgv6FMfe5WNUtnPzt3okYxcJhYnR", "senderPublicKey": "E5a4uvuhhyXww4vBjQSUhMY6epZK5yHP5j4uyag1XCss", "proofs": [ "5jsDWSHAusbRbmohQqtjPFHVYnUti1owQh7GPzQNy3WhGv6XmDqfdYhp2oVpSXQ8VVwLkevMUf69BFWBRvVSkag5" ], "script": "base64:AAIDAAAAAAAAAAcIARIDCgEIAAAACwAAAAAQd2hpdGVsaXN0QWRkcmVzcwkBAAAAB0FkZHJlc3MAAAABAQAAABoBVLLimz67CUQJNoVouJYmvTIXbUaFQRQgNQAAAAAUZEFwcFdoaXRlbGlzdEFkZHJlc3MJAQAAAAdBZGRyZXNzAAAAAQEAAAAaAVR+ZQJfWyfFbW//7FjY3Cz3zzwo/8TmrxYAAAAACXBBZGRyZXNzMQkBAAAAEWFkZHJlc3NGcm9tU3RyaW5nAAAAAQIAAAAjM05DVkRhVDFBU2JSZDQyaEJTdzRFRzZvakdWUkd0dk1pejEAAAAACXBBZGRyZXNzMgkBAAAAEWFkZHJlc3NGcm9tU3RyaW5nAAAAAQIAAAAjM01zMmtUQXhkcmNYRHh3ZWRmYk5qU2k2ZXdHQ1VxdDNoZVoAAAAACXBBZGRyZXNzMwkBAAAAEWFkZHJlc3NGcm9tU3RyaW5nAAAAAQIAAAAjM042b2dubTd4blFTRmlvd25TMURmMUxhY0pVUVh2ZkRGTGUAAAAACXBBZGRyZXNzNAkBAAAAEWFkZHJlc3NGcm9tU3RyaW5nA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0cmFjdAAAAAEFAAAACXBBZGRyZXNzMwkAAlgAAAABCAUAAAACdHgAAAACaWQAAAAAAAAAAAEAAAAAAAAAAAAEAAAAC3BLZXk0U2lnbmVkAwkBAAAACWlzRGVmaW5lZAAAAAEJAAQaAAAAAgkBAAAAB2V4dHJhY3QAAAABBQAAAAlwQWRkcmVzczQJAAJYAAAAAQgFAAAAAnR4AAAAAmlkAAAAAAAAAAABAAAAAAAAAAAABAAAAAtwS2V5NVNpZ25lZAMJAQAAAAlpc0RlZmluZWQAAAABCQAEGgAAAAIJAQAAAAdleHRyYWN0AAAAAQUAAAAJcEFkZHJlc3M1CQACWAAAAAEIBQAAAAJ0eAAAAAJpZAAAAAAAAAAAAQAAAAAAAAAAAAkAAGcAAAACCQAAZAAAAAIJAABkAAAAAgkAAGQAAAACCQAAZAAAAAIFAAAAC3BLZXkxU2lnbmVkBQAAAAtwS2V5MlNpZ25lZAUAAAALcEtleTNTaWduZWQFAAAAC3BLZXk0U2lnbmVkBQAAAAtwS2V5NVNpZ25lZAAAAAAAAAAAAwcuLPbI", "chainId": 84, "height": 811486, "spentComplexity": 0 } View: original | compacted Prev: none Next: BmbfNmw2ErqdikhvSJHUkhNdYPoWayP3LYntJriUGC5L Full:
OldNewDifferences
1-# no script
1+{-# STDLIB_VERSION 3 #-}
2+{-# SCRIPT_TYPE ACCOUNT #-}
3+{-# CONTENT_TYPE DAPP #-}
4+let whitelistAddress = Address(base58'3N6DwWxT82nGJUwBwd7L514r2u71gr7WhwJ')
5+
6+let dAppWhitelistAddress = Address(base58'3N1SPvLZgv6FMfe5WNUtnPzt3okYxcJhYnR')
7+
8+let pAddress1 = addressFromString("3NCVDaT1ASbRd42hBSw4EG6ojGVRGtvMiz1")
9+
10+let pAddress2 = addressFromString("3Ms2kTAxdrcXDxwedfbNjSi6ewGCUqt3heZ")
11+
12+let pAddress3 = addressFromString("3N6ognm7xnQSFiownS1Df1LacJUQXvfDFLe")
13+
14+let pAddress4 = addressFromString("3MtVCmN9MZbWf9qxiMFoEPBrdc2fLp3SvuC")
15+
16+let pAddress5 = addressFromString("3MuWG8gsTK4RQBsm97sMCuUXW99JvRxwYSg")
17+
18+let ver = "0.0.1-otc-testnet"
19+
20+let validState = 1000
21+
22+func getPayment (i) = match i.payment {
23+ case p: AttachedPayment =>
24+ p
25+ case _ =>
26+ throw("Payment must be attached")
27+}
28+
29+
30+func checkAddress (account) = {
31+ let isAccountAllow = match getInteger(whitelistAddress, account) {
32+ case a: Int =>
33+ a
34+ case _ =>
35+ -255
36+ }
37+ (isAccountAllow == validState)
38+ }
39+
40+
41+@Callable(i)
42+func transfer (toAddress) = {
43+ let dAppStatus = match getInteger(dAppWhitelistAddress, toString(this)) {
44+ case a: Int =>
45+ a
46+ case _ =>
47+ 0
48+ }
49+ if ((dAppStatus == 0))
50+ then throw("Dealer dApp is not active")
51+ else {
52+ let callerCheck = checkAddress(toBase58String(i.caller.bytes))
53+ let recipientCheck = checkAddress(toAddress)
54+ if (if (callerCheck)
55+ then recipientCheck
56+ else false)
57+ then {
58+ let payment = getPayment(i)
59+ TransferSet([ScriptTransfer(addressFromStringValue(toAddress), payment.amount, payment.assetId)])
60+ }
61+ else throw("This account has no right to send/get funds.")
62+ }
63+ }
64+
65+
66+@Verifier(tx)
67+func verify () = match tx {
68+ case tx: SetScriptTransaction =>
69+ let pKey1Signed = if (isDefined(getInteger(extract(pAddress1), toBase58String(tx.id))))
70+ then 1
71+ else 0
72+ let pKey2Signed = if (isDefined(getInteger(extract(pAddress2), toBase58String(tx.id))))
73+ then 1
74+ else 0
75+ let pKey3Signed = if (isDefined(getInteger(extract(pAddress3), toBase58String(tx.id))))
76+ then 1
77+ else 0
78+ let pKey4Signed = if (isDefined(getInteger(extract(pAddress4), toBase58String(tx.id))))
79+ then 1
80+ else 0
81+ let pKey5Signed = if (isDefined(getInteger(extract(pAddress5), toBase58String(tx.id))))
82+ then 1
83+ else 0
84+ (((((pKey1Signed + pKey2Signed) + pKey3Signed) + pKey4Signed) + pKey5Signed) >= 3)
85+ case _ =>
86+ false
87+}
88+

github/deemru/w8io/169f3d6 
28.39 ms