tx · 6seo86jW3uptTdLY2X17FqNkfG3zs57LsLarzvTkrLgB

3MzmMwLwGx26c6SEQyghZvoYckQzmq4jusd:  -0.14000000 Waves

2022.12.15 15:06 [2361397] smart account 3MzmMwLwGx26c6SEQyghZvoYckQzmq4jusd > SELF 0.00000000 Waves

{ "type": 13, "id": "6seo86jW3uptTdLY2X17FqNkfG3zs57LsLarzvTkrLgB", "fee": 14000000, "feeAssetId": null, "timestamp": 1671106107337, "version": 2, "chainId": 84, "sender": "3MzmMwLwGx26c6SEQyghZvoYckQzmq4jusd", "senderPublicKey": "4enJnpb22dKBKv5LQx9eLesMHfLz9H6j8iJF1z6aYx7T", "proofs": [ "3MSPehBVTbwNAfbXEydziUJeLNv85WChpsZrXbwi6nrNkcoXjCaNE9WzrGBTH5qYouo4hK2ZFg5wyaLjjJE69uKy" ], "script": "base64:BgICCAINAA1rUG9vbEluT3JlY2xlAgVwb29sXwANa1Bvb2xBc3NldElkQQIKQV9hc3NldF9pZAANa1Bvb2xBc3NldElkQgIKQl9hc3NldF9pZAAGb3JhY2xlCQEHQWRkcmVzcwEBGgFUSBOXDMDTM8wlMoC2KfenZGiAq+PMe0uZARNnZXRCYXNlNThGcm9tT3JhY2xlAQNrZXkEByRtYXRjaDAJAJ0IAgUGb3JhY2xlBQNrZXkDCQABAgUHJG1hdGNoMAIGU3RyaW5nBAZzdHJpbmcFByRtYXRjaDAJANkEAQUGc3RyaW5nBAdub3RoaW5nBQckbWF0Y2gwCQACAQkArAICBQNrZXkCCGlzIGVtcHR5AA1rQWRtaW5QdWJLZXkxAgthZG1pbl9wdWJfMQANa0FkbWluUHViS2V5MgILYWRtaW5fcHViXzIADWtBZG1pblB1YktleTMCC2FkbWluX3B1Yl8zABJrQWRtaW5JbnZva2VQdWJLZXkCEGFkbWluX2ludm9rZV9wdWIADGFkbWluUHViS2V5MQkBE2dldEJhc2U1OEZyb21PcmFjbGUBBQ1rQWRtaW5QdWJLZXkxAAxhZG1pblB1YktleTIJARNnZXR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aWduZWRCeU9uZUFkbWluBwUPaXNUcmFuc2ZlcldhdmVzBwkAZwIJAGQCCQBkAgUSYWRtaW5QdWJLZXkxU2lnbmVkBRJhZG1pblB1YktleTJTaWduZWQFEmFkbWluUHViS2V5M1NpZ25lZAACwe84hw==", "height": 2361397, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: EKRiNP3KrQaJomqA9KtZExcxoxNz3mvCevpYWwFCnrif Full:
OldNewDifferences
1-# no script
1+{-# STDLIB_VERSION 6 #-}
2+{-# SCRIPT_TYPE ACCOUNT #-}
3+{-# CONTENT_TYPE DAPP #-}
4+let kPoolInOrecle = "pool_"
5+
6+let kPoolAssetIdA = "A_asset_id"
7+
8+let kPoolAssetIdB = "B_asset_id"
9+
10+let oracle = Address(base58'3MvVBtsXroQpy1tsPw21TU2ET9A8WfmrNjz')
11+
12+func getBase58FromOracle (key) = match getString(oracle, key) {
13+ case string: String =>
14+ fromBase58String(string)
15+ case nothing =>
16+ throw((key + "is empty"))
17+}
18+
19+
20+let kAdminPubKey1 = "admin_pub_1"
21+
22+let kAdminPubKey2 = "admin_pub_2"
23+
24+let kAdminPubKey3 = "admin_pub_3"
25+
26+let kAdminInvokePubKey = "admin_invoke_pub"
27+
28+let adminPubKey1 = getBase58FromOracle(kAdminPubKey1)
29+
30+let adminPubKey2 = getBase58FromOracle(kAdminPubKey2)
31+
32+let adminPubKey3 = getBase58FromOracle(kAdminPubKey3)
33+
34+let adminInvoke = getBase58FromOracle(kAdminInvokePubKey)
35+
36+
37+@Verifier(tx)
38+func verify () = {
39+ let adminPubKey1Signed = if (sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey1))
40+ then 1
41+ else 0
42+ let adminPubKey2Signed = if (sigVerify(tx.bodyBytes, tx.proofs[1], adminPubKey2))
43+ then 1
44+ else 0
45+ let adminPubKey3Signed = if (sigVerify(tx.bodyBytes, tx.proofs[2], adminPubKey3))
46+ then 1
47+ else 0
48+ let adminPubKeyInvokeSigned = if (sigVerify(tx.bodyBytes, tx.proofs[2], adminInvoke))
49+ then 1
50+ else 0
51+ match tx {
52+ case t: MassTransferTransaction =>
53+ func poolInOracle (a,transfer) = {
54+ let poolAddress = match transfer.recipient {
55+ case add: Address =>
56+ toString(add)
57+ case _ =>
58+ throw("Not known type of recipient")
59+ }
60+ if (isDefined(getString(oracle, (kPoolInOrecle + poolAddress))))
61+ then if ((valueOrElse(getString(transfer.recipient, kPoolAssetIdA), "") == "WAVES"))
62+ then true
63+ else (valueOrElse(getString(transfer.recipient, kPoolAssetIdB), "") == "WAVES")
64+ else false
65+ }
66+
67+ let isRightFee = (t.fee == (500000 + (50000 * size(t.transfers))))
68+ let isTransferWaves = (t.assetId == unit)
69+ let signedByOneAdmin = ((((adminPubKey1Signed + adminPubKey2Signed) + adminPubKey3Signed) + adminPubKeyInvokeSigned) >= 1)
70+ if (if (if ({
71+ let $l = t.transfers
72+ let $s = size($l)
73+ let $acc0 = true
74+ func $f0_1 ($a,$i) = if (($i >= $s))
75+ then $a
76+ else poolInOracle($a, $l[$i])
77+
78+ func $f0_2 ($a,$i) = if (($i >= $s))
79+ then $a
80+ else throw("List size exceeds 27")
81+
82+ $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27)
83+ })
84+ then isRightFee
85+ else false)
86+ then signedByOneAdmin
87+ else false)
88+ then isTransferWaves
89+ else false
90+ case _ =>
91+ (((adminPubKey1Signed + adminPubKey2Signed) + adminPubKey3Signed) >= 2)
92+ }
93+ }
94+

github/deemru/w8io/026f985 
22.44 ms