tx · BmbfNmw2ErqdikhvSJHUkhNdYPoWayP3LYntJriUGC5L

3N1SPvLZgv6FMfe5WNUtnPzt3okYxcJhYnR:  -0.01400000 Waves

2019.12.16 18:00 [811601] smart account 3N1SPvLZgv6FMfe5WNUtnPzt3okYxcJhYnR > SELF 0.00000000 Waves

{ "type": 13, "id": "BmbfNmw2ErqdikhvSJHUkhNdYPoWayP3LYntJriUGC5L", "fee": 1400000, "feeAssetId": null, "timestamp": 1576508476729, "version": 1, "sender": "3N1SPvLZgv6FMfe5WNUtnPzt3okYxcJhYnR", "senderPublicKey": "E5a4uvuhhyXww4vBjQSUhMY6epZK5yHP5j4uyag1XCss", "proofs": [], "script": "base64:AAIDAAAAAAAAAAIIAQAAAAAAAAAAAAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAaQqCec", "chainId": 84, "height": 811601, "spentComplexity": 0 } View: original | compacted Prev: DEx6fdt6EWm32GqRFHAzAjmkCEGvBvvgpBuPVEfGxSp2 Next: 5kLe6MRS48sssoPfuh95eewxHBH5nx5Jn46T2ELuseD7 Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-let whitelistAddress = Address(base58'3N6DwWxT82nGJUwBwd7L514r2u71gr7WhwJ')
54
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- }
645
656
667 @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-}
8+func verify () = true
889

github/deemru/w8io/169f3d6 
57.29 ms