tx · BkSbowoKDG625JsvrEkE8g9ZnPMwNWSDjN59dTTsjP6w

3N2eueE5vLLKe8jXuBDbdbKcPaH36yG1Had:  -0.14000000 Waves

2022.12.06 10:35 [2348182] smart account 3N2eueE5vLLKe8jXuBDbdbKcPaH36yG1Had > SELF 0.00000000 Waves

{ "type": 13, "id": "BkSbowoKDG625JsvrEkE8g9ZnPMwNWSDjN59dTTsjP6w", "fee": 14000000, "feeAssetId": null, "timestamp": 1670312159164, "version": 2, "chainId": 84, "sender": "3N2eueE5vLLKe8jXuBDbdbKcPaH36yG1Had", "senderPublicKey": "EAmZF2D2BbfoPsrMGFAs2UCv8ScAXxhAZRzFpkveca8G", "proofs": [ "639B1bPniSZmZFC1ZSoQPRmJogRf37ctJdVeH3JqGG6Thhdg58ExjACppyWXkzoKSJn88Ch9dXcrLU41xnmubcHk", "NGTrzGSQMSTkX4Esz4nYEbhRARYZiLGwBRZNbCKK5ycFsdFkXyevkipNhREoHSJXnW4C3ypcwUky7mSuSbGPnDW" ], "script": "base64:BgICCAIRAAZvcmFjbGUJAQdBZGRyZXNzAQEaAVRIE5cMwNMzzCUygLYp96dkaICr48x7S5kBE2dldEJhc2U1OEZyb21PcmFjbGUBA2tleQQHJG1hdGNoMAkAnQgCBQZvcmFjbGUFA2tleQMJAAECBQckbWF0Y2gwAgZTdHJpbmcEBnN0cmluZwUHJG1hdGNoMAkA2QQBBQZzdHJpbmcEB25vdGhpbmcFByRtYXRjaDAJAAIBCQCsAgIFA2tleQIIaXMgZW1wdHkADWtBZG1pblB1YktleTECC2FkbWluX3B1Yl8xAA1rQWRtaW5QdWJLZXkyAgthZG1pbl9wdWJfMgANa0FkbWluUHViS2V5MwILYWRtaW5fcHViXzMAEmtBZG1pbkludm9rZVB1YktleQIQYWRtaW5faW52b2tlX3B1YgALa0dvdkFkZHJlc3MCEmdvdmVybmFuY2VfYWRkcmVzcwAMa0Zhcm1BZGRyZXNzAg9mYXJtaW5nX2FkZHJlc3MAD2tTdXJ2Z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bENQTU0GBQ1pc0FpcmRyb3BDYWxsCQAAAgkAkAMBCAUDaW52CHBheW1lbnRzAAEHBgMDAwMDBRNpc1VwZGF0ZVdlaWdodHNDYWxsBgUUaXNVcGRhdGVQb29sSW50ZXJlc3QGBRJpc1Rha2VuSW50b0FjY291bnQGBRZpc1Rha2VuSW50b0FjY291bnRDUE1NBgUMaXNXcml0ZVRvdGFsCQAAAgkAkAMBCAUDaW52CHBheW1lbnRzAAAHBQ1zaWduZWRCeUFkbWluBwQSYWRtaW5QdWJLZXkxU2lnbmVkAwkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAUMYWRtaW5QdWJLZXkxAAEAAAQSYWRtaW5QdWJLZXkyU2lnbmVkAwkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAQUMYWRtaW5QdWJLZXkyAAEAAAQSYWRtaW5QdWJLZXkzU2lnbmVkAwkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAgUMYWRtaW5QdWJLZXkzAAEAAAkAZwIJAGQCCQBkAgUSYWRtaW5QdWJLZXkxU2lnbmVkBRJhZG1pblB1YktleTJTaWduZWQFEmFkbWluUHViS2V5M1NpZ25lZAACyv7zDA==", "height": 2348182, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 3qJQxdYx3rbgQfjtTKtfEdmSTuf5nxs3h1hseBkWmi1V Next: 4mQgv8gFZ6322cVh4C4QX1U7CPaf6irztSsMxkFHQPkd Diff:
OldNewDifferences
4545 @Verifier(tx)
4646 func verify () = match tx {
4747 case inv: InvokeScriptTransaction =>
48- let isExchangeCall = if (if (isDefined(getString(oracle, (keyPrefixPoolName + toString(addressFromRecipient(inv.dApp))))))
48+ let isExchangeCallCPMM = if (if (isDefined(getString(oracle, (keyPrefixPoolName + toString(addressFromRecipient(inv.dApp))))))
4949 then (inv.function == "callFunction")
5050 else false)
5151 then (inv.args[0] == "exchange")
52+ else false
53+ let isExchangeCall = if (isDefined(getString(oracle, (keyPrefixPoolName + toString(addressFromRecipient(inv.dApp))))))
54+ then (inv.function == "exchange")
5255 else false
5356 let isAirdropCall = if ((inv.dApp == governanceAddress))
5457 then (inv.function == "airDrop")
5962 let isUpdatePoolInterest = if ((inv.dApp == farmingAddress))
6063 then (inv.function == "updatePoolInterest")
6164 else false
62- let isTakenIntoAccount = if (if (isDefined(getString(oracle, (keyPrefixPoolName + toString(addressFromRecipient(inv.dApp))))))
65+ let isTakenIntoAccountCPMM = if (if (isDefined(getString(oracle, (keyPrefixPoolName + toString(addressFromRecipient(inv.dApp))))))
6366 then (inv.function == "callFunction")
6467 else false)
6568 then (inv.args[0] == "takeIntoAccountExtraFunds")
69+ else false
70+ let isTakenIntoAccount = if (isDefined(getString(oracle, (keyPrefixPoolName + toString(addressFromRecipient(inv.dApp))))))
71+ then (inv.function == "takeIntoAccountExtraFunds")
6672 else false
6773 let isWriteTotal = if ((inv.dApp == surveysAddress))
6874 then (inv.function == "writeTotals")
6975 else false
7076 let signedByAdmin = sigVerify(tx.bodyBytes, tx.proofs[0], adminInvoke)
71- if (if (if (if (isExchangeCall)
77+ if (if (if (if (if (isExchangeCall)
78+ then true
79+ else isExchangeCallCPMM)
7280 then true
7381 else isAirdropCall)
7482 then (size(inv.payments) == 1)
7583 else false)
7684 then true
77- else if (if (if (if (isUpdateWeightsCall)
85+ else if (if (if (if (if (isUpdateWeightsCall)
7886 then true
7987 else isUpdatePoolInterest)
8088 then true
8189 else isTakenIntoAccount)
90+ then true
91+ else isTakenIntoAccountCPMM)
8292 then true
8393 else isWriteTotal)
8494 then (size(inv.payments) == 0)
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 adminPubKey1 = getBase58FromOracle(kAdminPubKey1)
2929
3030 let adminPubKey2 = getBase58FromOracle(kAdminPubKey2)
3131
3232 let adminPubKey3 = getBase58FromOracle(kAdminPubKey3)
3333
3434 let adminInvoke = getBase58FromOracle(kAdminInvokePubKey)
3535
3636 let governanceAddress = Address(getBase58FromOracle(kGovAddress))
3737
3838 let farmingAddress = Address(getBase58FromOracle(kFarmAddress))
3939
4040 let surveysAddress = Address(getBase58FromOracle(kSurveysAddress))
4141
4242 let keyPrefixPoolName = "pool_"
4343
4444
4545 @Verifier(tx)
4646 func verify () = match tx {
4747 case inv: InvokeScriptTransaction =>
48- let isExchangeCall = if (if (isDefined(getString(oracle, (keyPrefixPoolName + toString(addressFromRecipient(inv.dApp))))))
48+ let isExchangeCallCPMM = if (if (isDefined(getString(oracle, (keyPrefixPoolName + toString(addressFromRecipient(inv.dApp))))))
4949 then (inv.function == "callFunction")
5050 else false)
5151 then (inv.args[0] == "exchange")
52+ else false
53+ let isExchangeCall = if (isDefined(getString(oracle, (keyPrefixPoolName + toString(addressFromRecipient(inv.dApp))))))
54+ then (inv.function == "exchange")
5255 else false
5356 let isAirdropCall = if ((inv.dApp == governanceAddress))
5457 then (inv.function == "airDrop")
5558 else false
5659 let isUpdateWeightsCall = if ((inv.dApp == governanceAddress))
5760 then (inv.function == "updateWeights")
5861 else false
5962 let isUpdatePoolInterest = if ((inv.dApp == farmingAddress))
6063 then (inv.function == "updatePoolInterest")
6164 else false
62- let isTakenIntoAccount = if (if (isDefined(getString(oracle, (keyPrefixPoolName + toString(addressFromRecipient(inv.dApp))))))
65+ let isTakenIntoAccountCPMM = if (if (isDefined(getString(oracle, (keyPrefixPoolName + toString(addressFromRecipient(inv.dApp))))))
6366 then (inv.function == "callFunction")
6467 else false)
6568 then (inv.args[0] == "takeIntoAccountExtraFunds")
69+ else false
70+ let isTakenIntoAccount = if (isDefined(getString(oracle, (keyPrefixPoolName + toString(addressFromRecipient(inv.dApp))))))
71+ then (inv.function == "takeIntoAccountExtraFunds")
6672 else false
6773 let isWriteTotal = if ((inv.dApp == surveysAddress))
6874 then (inv.function == "writeTotals")
6975 else false
7076 let signedByAdmin = sigVerify(tx.bodyBytes, tx.proofs[0], adminInvoke)
71- if (if (if (if (isExchangeCall)
77+ if (if (if (if (if (isExchangeCall)
78+ then true
79+ else isExchangeCallCPMM)
7280 then true
7381 else isAirdropCall)
7482 then (size(inv.payments) == 1)
7583 else false)
7684 then true
77- else if (if (if (if (isUpdateWeightsCall)
85+ else if (if (if (if (if (isUpdateWeightsCall)
7886 then true
7987 else isUpdatePoolInterest)
8088 then true
8189 else isTakenIntoAccount)
90+ then true
91+ else isTakenIntoAccountCPMM)
8292 then true
8393 else isWriteTotal)
8494 then (size(inv.payments) == 0)
8595 else false)
8696 then signedByAdmin
8797 else false
8898 case _ =>
8999 let adminPubKey1Signed = if (sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey1))
90100 then 1
91101 else 0
92102 let adminPubKey2Signed = if (sigVerify(tx.bodyBytes, tx.proofs[1], adminPubKey2))
93103 then 1
94104 else 0
95105 let adminPubKey3Signed = if (sigVerify(tx.bodyBytes, tx.proofs[2], adminPubKey3))
96106 then 1
97107 else 0
98108 (((adminPubKey1Signed + adminPubKey2Signed) + adminPubKey3Signed) >= 2)
99109 }
100110

github/deemru/w8io/169f3d6 
35.90 ms