tx · 8z1mRHTvsEt2AzVUG8QDkdwCAdXGiZEaDJVzURqWkxV1

3N2eueE5vLLKe8jXuBDbdbKcPaH36yG1Had:  -0.14000000 Waves

2022.12.15 13:07 [2361283] smart account 3N2eueE5vLLKe8jXuBDbdbKcPaH36yG1Had > SELF 0.00000000 Waves

{ "type": 13, "id": "8z1mRHTvsEt2AzVUG8QDkdwCAdXGiZEaDJVzURqWkxV1", "fee": 14000000, "feeAssetId": null, "timestamp": 1671098837465, "version": 2, "chainId": 84, "sender": "3N2eueE5vLLKe8jXuBDbdbKcPaH36yG1Had", "senderPublicKey": "EAmZF2D2BbfoPsrMGFAs2UCv8ScAXxhAZRzFpkveca8G", "proofs": [ "5CUVrEyTf9fP6sPjBbjfJFaUtsjuS5pYq1HEzoADX5bWod2oqgwuTBByaZEzDhsxbGsKdUiPLLPRSUB9Eg5FneCf", "5txvcgoE6L8WNxSasw5XdkvUVT7DKkLFoU9TPsjLdi6XBk5dc3rsdhrsvU3yVkAcmugHn1QtGkdQrEv4NtzVUBkH" ], "script": "base64:BgICCAITAAZvcmFjbGUJAQdBZGRyZXNzAQEaAVRIE5cMwNMzzCUygLYp96dkaICr48x7S5kBE2dldEJhc2U1OEZyb21PcmFjbGUBA2tleQQHJG1hdGNoMAkAnQgCBQZvcmFjbGUFA2tleQMJAAECBQckbWF0Y2gwAgZTdHJpbmcEBnN0cmluZwUHJG1hdGNoMAkA2QQBBQZzdHJpbmcEB25vdGhpbmcFByRtYXRjaDAJAAIBCQCsAgIFA2tleQIIaXMgZW1wdHkADWtBZG1pblB1YktleTECC2FkbWluX3B1Yl8xAA1rQWRtaW5QdWJLZXkyAgthZG1pbl9wdWJfMgANa0FkbWluUHViS2V5MwILYWRtaW5fcHViXzMAEmtBZG1pbkludm9rZVB1YktleQIQYWRtaW5faW52b2tlX3B1YgALa0dvdkFkZHJlc3MCEmdvdmVybmFuY2VfYWRkcmVzcwAMa0Zhcm1BZGRyZXNzAg9mYXJtaW5nX2FkZHJlc3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283, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 4mQgv8gFZ6322cVh4C4QX1U7CPaf6irztSsMxkFHQPkd Next: EtgAuHSS2sxcWufC5n3kfXc4g4Ybh6WmDx5JRsAMArRb Diff:
OldNewDifferences
4747
4848
4949 @Verifier(tx)
50-func verify () = match tx {
51- case inv: InvokeScriptTransaction =>
52- let isRoutingCall = if ((inv.dApp == routingAddress))
53- then (inv.function == "routingTrade")
54- else false
55- let isExchangeCallCPMM = if (if (isDefined(getString(oracle, (keyPrefixPoolName + toString(addressFromRecipient(inv.dApp))))))
56- then (inv.function == "callFunction")
57- else false)
58- then (inv.args[0] == "exchange")
59- else false
60- let isExchangeCall = if (isDefined(getString(oracle, (keyPrefixPoolName + toString(addressFromRecipient(inv.dApp))))))
61- then (inv.function == "exchange")
62- else false
63- let isAirdropCall = if ((inv.dApp == governanceAddress))
64- then (inv.function == "airDrop")
65- else false
66- let isUpdateWeightsCall = if ((inv.dApp == governanceAddress))
67- then (inv.function == "updateWeights")
68- else false
69- let isTakenIntoAccountCPMM = if (if (isDefined(getString(oracle, (keyPrefixPoolName + toString(addressFromRecipient(inv.dApp))))))
70- then (inv.function == "callFunction")
71- else false)
72- then (inv.args[0] == "takeIntoAccountExtraFunds")
73- else false
74- let isTakenIntoAccount = if (isDefined(getString(oracle, (keyPrefixPoolName + toString(addressFromRecipient(inv.dApp))))))
75- then (inv.function == "takeIntoAccountExtraFunds")
76- else false
77- let isWriteTotal = if ((inv.dApp == surveysAddress))
78- then (inv.function == "writeTotals")
79- else false
80- let signedByAdmin = sigVerify(tx.bodyBytes, tx.proofs[0], adminInvoke)
81- if (if (if (if (if (if (isExchangeCall)
82- then true
83- else isExchangeCallCPMM)
84- then true
85- else isAirdropCall)
86- then true
87- else isRoutingCall)
88- then (size(inv.payments) == 1)
89- else false)
90- then true
91- else if (if (if (if (isUpdateWeightsCall)
50+func verify () = {
51+ let adminPubKey1Signed = if (sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey1))
52+ then 1
53+ else 0
54+ let adminPubKey2Signed = if (sigVerify(tx.bodyBytes, tx.proofs[1], adminPubKey2))
55+ then 1
56+ else 0
57+ let adminPubKey3Signed = if (sigVerify(tx.bodyBytes, tx.proofs[2], adminPubKey3))
58+ then 1
59+ else 0
60+ let adminPubKeyInvokeSigned = if (sigVerify(tx.bodyBytes, tx.proofs[2], adminInvoke))
61+ then 1
62+ else 0
63+ match tx {
64+ case inv: InvokeScriptTransaction =>
65+ let isRightFee = if ((inv.fee == 900000))
66+ then (inv.feeAssetId == unit)
67+ else false
68+ let isRoutingCall = if ((inv.dApp == routingAddress))
69+ then (inv.function == "routingTrade")
70+ else false
71+ let isExchangeCallCPMM = if (if (isDefined(getString(oracle, (keyPrefixPoolName + toString(addressFromRecipient(inv.dApp))))))
72+ then (inv.function == "callFunction")
73+ else false)
74+ then (inv.args[0] == "exchange")
75+ else false
76+ let isExchangeCall = if (isDefined(getString(oracle, (keyPrefixPoolName + toString(addressFromRecipient(inv.dApp))))))
77+ then (inv.function == "exchange")
78+ else false
79+ let isAirdropCall = if ((inv.dApp == governanceAddress))
80+ then (inv.function == "airDrop")
81+ else false
82+ let isUpdateWeightsCall = if ((inv.dApp == governanceAddress))
83+ then (inv.function == "updateWeights")
84+ else false
85+ let isTakenIntoAccountCPMM = if (if (isDefined(getString(oracle, (keyPrefixPoolName + toString(addressFromRecipient(inv.dApp))))))
86+ then (inv.function == "callFunction")
87+ else false)
88+ then (inv.args[0] == "takeIntoAccountExtraFunds")
89+ else false
90+ let isTakenIntoAccount = if (isDefined(getString(oracle, (keyPrefixPoolName + toString(addressFromRecipient(inv.dApp))))))
91+ then (inv.function == "takeIntoAccountExtraFunds")
92+ else false
93+ let isWriteTotal = if ((inv.dApp == surveysAddress))
94+ then (inv.function == "writeTotals")
95+ else false
96+ let signedByOneAdmin = ((((adminPubKey1Signed + adminPubKey2Signed) + adminPubKey3Signed) + adminPubKeyInvokeSigned) >= 1)
97+ if (if (if (if (if (if (if (isExchangeCall)
9298 then true
93- else isTakenIntoAccount)
99+ else isExchangeCallCPMM)
94100 then true
95- else isTakenIntoAccountCPMM)
101+ else isAirdropCall)
96102 then true
97- else isWriteTotal)
98- then (size(inv.payments) == 0)
103+ else isRoutingCall)
104+ then (size(inv.payments) == 1)
99105 else false)
100- then signedByAdmin
101- else false
102- case _ =>
103- let adminPubKey1Signed = if (sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey1))
104- then 1
105- else 0
106- let adminPubKey2Signed = if (sigVerify(tx.bodyBytes, tx.proofs[1], adminPubKey2))
107- then 1
108- else 0
109- let adminPubKey3Signed = if (sigVerify(tx.bodyBytes, tx.proofs[2], adminPubKey3))
110- then 1
111- else 0
112- (((adminPubKey1Signed + adminPubKey2Signed) + adminPubKey3Signed) >= 2)
113-}
106+ then true
107+ else if (if (if (if (isUpdateWeightsCall)
108+ then true
109+ else isTakenIntoAccount)
110+ then true
111+ else isTakenIntoAccountCPMM)
112+ then true
113+ else isWriteTotal)
114+ then (size(inv.payments) == 0)
115+ else false)
116+ then signedByOneAdmin
117+ else false)
118+ then isRightFee
119+ else false
120+ case _ =>
121+ (((adminPubKey1Signed + adminPubKey2Signed) + adminPubKey3Signed) >= 2)
122+ }
123+ }
114124
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let oracle = Address(base58'3MvVBtsXroQpy1tsPw21TU2ET9A8WfmrNjz')
55
66 func getBase58FromOracle (key) = match getString(oracle, key) {
77 case string: String =>
88 fromBase58String(string)
99 case nothing =>
1010 throw((key + "is empty"))
1111 }
1212
1313
1414 let kAdminPubKey1 = "admin_pub_1"
1515
1616 let kAdminPubKey2 = "admin_pub_2"
1717
1818 let kAdminPubKey3 = "admin_pub_3"
1919
2020 let kAdminInvokePubKey = "admin_invoke_pub"
2121
2222 let kGovAddress = "governance_address"
2323
2424 let kFarmAddress = "farming_address"
2525
2626 let kSurveysAddress = "surveys_address"
2727
2828 let kRoutingAddr = "routing_address"
2929
3030 let adminPubKey1 = getBase58FromOracle(kAdminPubKey1)
3131
3232 let adminPubKey2 = getBase58FromOracle(kAdminPubKey2)
3333
3434 let adminPubKey3 = getBase58FromOracle(kAdminPubKey3)
3535
3636 let adminInvoke = getBase58FromOracle(kAdminInvokePubKey)
3737
3838 let governanceAddress = Address(getBase58FromOracle(kGovAddress))
3939
4040 let farmingAddress = Address(getBase58FromOracle(kFarmAddress))
4141
4242 let surveysAddress = Address(getBase58FromOracle(kSurveysAddress))
4343
4444 let routingAddress = Address(getBase58FromOracle(kRoutingAddr))
4545
4646 let keyPrefixPoolName = "pool_"
4747
4848
4949 @Verifier(tx)
50-func verify () = match tx {
51- case inv: InvokeScriptTransaction =>
52- let isRoutingCall = if ((inv.dApp == routingAddress))
53- then (inv.function == "routingTrade")
54- else false
55- let isExchangeCallCPMM = if (if (isDefined(getString(oracle, (keyPrefixPoolName + toString(addressFromRecipient(inv.dApp))))))
56- then (inv.function == "callFunction")
57- else false)
58- then (inv.args[0] == "exchange")
59- else false
60- let isExchangeCall = if (isDefined(getString(oracle, (keyPrefixPoolName + toString(addressFromRecipient(inv.dApp))))))
61- then (inv.function == "exchange")
62- else false
63- let isAirdropCall = if ((inv.dApp == governanceAddress))
64- then (inv.function == "airDrop")
65- else false
66- let isUpdateWeightsCall = if ((inv.dApp == governanceAddress))
67- then (inv.function == "updateWeights")
68- else false
69- let isTakenIntoAccountCPMM = if (if (isDefined(getString(oracle, (keyPrefixPoolName + toString(addressFromRecipient(inv.dApp))))))
70- then (inv.function == "callFunction")
71- else false)
72- then (inv.args[0] == "takeIntoAccountExtraFunds")
73- else false
74- let isTakenIntoAccount = if (isDefined(getString(oracle, (keyPrefixPoolName + toString(addressFromRecipient(inv.dApp))))))
75- then (inv.function == "takeIntoAccountExtraFunds")
76- else false
77- let isWriteTotal = if ((inv.dApp == surveysAddress))
78- then (inv.function == "writeTotals")
79- else false
80- let signedByAdmin = sigVerify(tx.bodyBytes, tx.proofs[0], adminInvoke)
81- if (if (if (if (if (if (isExchangeCall)
82- then true
83- else isExchangeCallCPMM)
84- then true
85- else isAirdropCall)
86- then true
87- else isRoutingCall)
88- then (size(inv.payments) == 1)
89- else false)
90- then true
91- else if (if (if (if (isUpdateWeightsCall)
50+func verify () = {
51+ let adminPubKey1Signed = if (sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey1))
52+ then 1
53+ else 0
54+ let adminPubKey2Signed = if (sigVerify(tx.bodyBytes, tx.proofs[1], adminPubKey2))
55+ then 1
56+ else 0
57+ let adminPubKey3Signed = if (sigVerify(tx.bodyBytes, tx.proofs[2], adminPubKey3))
58+ then 1
59+ else 0
60+ let adminPubKeyInvokeSigned = if (sigVerify(tx.bodyBytes, tx.proofs[2], adminInvoke))
61+ then 1
62+ else 0
63+ match tx {
64+ case inv: InvokeScriptTransaction =>
65+ let isRightFee = if ((inv.fee == 900000))
66+ then (inv.feeAssetId == unit)
67+ else false
68+ let isRoutingCall = if ((inv.dApp == routingAddress))
69+ then (inv.function == "routingTrade")
70+ else false
71+ let isExchangeCallCPMM = if (if (isDefined(getString(oracle, (keyPrefixPoolName + toString(addressFromRecipient(inv.dApp))))))
72+ then (inv.function == "callFunction")
73+ else false)
74+ then (inv.args[0] == "exchange")
75+ else false
76+ let isExchangeCall = if (isDefined(getString(oracle, (keyPrefixPoolName + toString(addressFromRecipient(inv.dApp))))))
77+ then (inv.function == "exchange")
78+ else false
79+ let isAirdropCall = if ((inv.dApp == governanceAddress))
80+ then (inv.function == "airDrop")
81+ else false
82+ let isUpdateWeightsCall = if ((inv.dApp == governanceAddress))
83+ then (inv.function == "updateWeights")
84+ else false
85+ let isTakenIntoAccountCPMM = if (if (isDefined(getString(oracle, (keyPrefixPoolName + toString(addressFromRecipient(inv.dApp))))))
86+ then (inv.function == "callFunction")
87+ else false)
88+ then (inv.args[0] == "takeIntoAccountExtraFunds")
89+ else false
90+ let isTakenIntoAccount = if (isDefined(getString(oracle, (keyPrefixPoolName + toString(addressFromRecipient(inv.dApp))))))
91+ then (inv.function == "takeIntoAccountExtraFunds")
92+ else false
93+ let isWriteTotal = if ((inv.dApp == surveysAddress))
94+ then (inv.function == "writeTotals")
95+ else false
96+ let signedByOneAdmin = ((((adminPubKey1Signed + adminPubKey2Signed) + adminPubKey3Signed) + adminPubKeyInvokeSigned) >= 1)
97+ if (if (if (if (if (if (if (isExchangeCall)
9298 then true
93- else isTakenIntoAccount)
99+ else isExchangeCallCPMM)
94100 then true
95- else isTakenIntoAccountCPMM)
101+ else isAirdropCall)
96102 then true
97- else isWriteTotal)
98- then (size(inv.payments) == 0)
103+ else isRoutingCall)
104+ then (size(inv.payments) == 1)
99105 else false)
100- then signedByAdmin
101- else false
102- case _ =>
103- let adminPubKey1Signed = if (sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey1))
104- then 1
105- else 0
106- let adminPubKey2Signed = if (sigVerify(tx.bodyBytes, tx.proofs[1], adminPubKey2))
107- then 1
108- else 0
109- let adminPubKey3Signed = if (sigVerify(tx.bodyBytes, tx.proofs[2], adminPubKey3))
110- then 1
111- else 0
112- (((adminPubKey1Signed + adminPubKey2Signed) + adminPubKey3Signed) >= 2)
113-}
106+ then true
107+ else if (if (if (if (isUpdateWeightsCall)
108+ then true
109+ else isTakenIntoAccount)
110+ then true
111+ else isTakenIntoAccountCPMM)
112+ then true
113+ else isWriteTotal)
114+ then (size(inv.payments) == 0)
115+ else false)
116+ then signedByOneAdmin
117+ else false)
118+ then isRightFee
119+ else false
120+ case _ =>
121+ (((adminPubKey1Signed + adminPubKey2Signed) + adminPubKey3Signed) >= 2)
122+ }
123+ }
114124

github/deemru/w8io/169f3d6 
43.53 ms