tx · BM1susiGXguobSUZ5Emheg6z1AUVNHLYEjjevqFBFNSk

3N2eueE5vLLKe8jXuBDbdbKcPaH36yG1Had:  -0.00700000 Waves

2023.02.02 11:25 [2431758] smart account 3N2eueE5vLLKe8jXuBDbdbKcPaH36yG1Had > SELF 0.00000000 Waves

{ "type": 13, "id": "BM1susiGXguobSUZ5Emheg6z1AUVNHLYEjjevqFBFNSk", "fee": 700000, "feeAssetId": null, "timestamp": 1675326400031, "version": 2, "chainId": 84, "sender": "3N2eueE5vLLKe8jXuBDbdbKcPaH36yG1Had", "senderPublicKey": "EAmZF2D2BbfoPsrMGFAs2UCv8ScAXxhAZRzFpkveca8G", "proofs": [ "4C8jEyMrWB8RPp82iNTx9mUM9gyJFnxuFU9JN2D7yBuyWMiRVNCEzzg5B5THjdAuiHJtW5RxAQwLDagrnbhLRvAT", "3ZcqFAWCZhEvkcVpmUiypcb3ZdZMN7FZovpQxtdJV8yk4i7uY419Ue8yfu2EQTzZmNxtRQhpJfbVFGuCL4fmyuhc" ], "script": "base64:BgICCAITAAZvcmFjbGUJAQdBZGRyZXNzAQEaAVRIE5cMwNMzzCUygLYp96dkaICr48x7S5kBE2dldEJhc2U1OEZyb21PcmFjbGUBA2tleQQHJG1hdGNoMAkAnQgCBQZvcmFjbGUFA2tleQMJAAECBQckbWF0Y2gwAgZTdHJpbmcEBnN0cmluZwUHJG1hdGNoMAkA2QQBBQZzdHJpbmcEB25vdGhpbmcFByRtYXRjaDAJAAIBCQCsAgIFA2tleQIIaXMgZW1wdHkADWtBZG1pblB1YktleTECC2FkbWluX3B1Yl8xAA1rQWRtaW5QdWJLZXkyAgthZG1pbl9wdWJfMgANa0FkbWluUHViS2V5MwILYWRtaW5fcHViXzMAEmtBZG1pbkludm9rZVB1YktleQIQYWRtaW5faW52b2tlX3B1YgALa0dvdkFkZHJlc3MCEmdvdmVybmFuY2VfYWRkcmVzcwAMa0Zhcm1BZGRyZXNzAg9mYXJtaW5nX2FkZHJlc3MAD2tTdX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BJhZG1pblB1YktleTJTaWduZWQDCQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwABBQxhZG1pblB1YktleTIAAQAABBJhZG1pblB1YktleTNTaWduZWQDCQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwACBQxhZG1pblB1YktleTMAAQAACQBnAgkAZAIJAGQCBRJhZG1pblB1YktleTFTaWduZWQFEmFkbWluUHViS2V5MlNpZ25lZAUSYWRtaW5QdWJLZXkzU2lnbmVkAALCnp71", "height": 2431758, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 7iJcWi3AabCt369fUA5gNMFkpmKX8fan5Ltdx7Mzaqds Next: 4euGcv6X318gndURAhGkuTPGUFDeBi5QBP58zHhp6Fqn 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)
5050 func verify () = match tx {
5151 case inv: InvokeScriptTransaction =>
5252 let isRightFee = if ((inv.fee == 900000))
5353 then (inv.feeAssetId == unit)
5454 else false
5555 let isRoutingCall = if ((inv.dApp == routingAddress))
5656 then (inv.function == "routingTrade")
5757 else false
5858 let isExchangeCallCPMM = if (if (isDefined(getString(oracle, (keyPrefixPoolName + toString(addressFromRecipient(inv.dApp))))))
5959 then (inv.function == "callFunction")
6060 else false)
6161 then (inv.args[0] == "exchange")
6262 else false
6363 let isExchangeCall = if (isDefined(getString(oracle, (keyPrefixPoolName + toString(addressFromRecipient(inv.dApp))))))
6464 then (inv.function == "exchange")
6565 else false
6666 let isAirdropCall = if ((inv.dApp == governanceAddress))
6767 then (inv.function == "airDrop")
6868 else false
6969 let isUpdateWeightsCall = if ((inv.dApp == governanceAddress))
7070 then (inv.function == "updateWeights")
7171 else false
7272 let isTakenIntoAccountCPMM = if (if (isDefined(getString(oracle, (keyPrefixPoolName + toString(addressFromRecipient(inv.dApp))))))
7373 then (inv.function == "callFunction")
7474 else false)
7575 then (inv.args[0] == "takeIntoAccountExtraFunds")
7676 else false
7777 let isTakenIntoAccount = if (isDefined(getString(oracle, (keyPrefixPoolName + toString(addressFromRecipient(inv.dApp))))))
7878 then (inv.function == "takeIntoAccountExtraFunds")
7979 else false
8080 let isWriteTotal = if ((inv.dApp == surveysAddress))
8181 then (inv.function == "writeTotals")
8282 else false
8383 let adminPubKey1Signed = if (sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey1))
8484 then 1
8585 else 0
8686 let adminPubKey2Signed = if (sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey2))
8787 then 1
8888 else 0
8989 let adminPubKey3Signed = if (sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey3))
9090 then 1
9191 else 0
9292 let adminPubKeyInvokeSigned = if (sigVerify(tx.bodyBytes, tx.proofs[0], adminInvoke))
9393 then 1
9494 else 0
9595 let signedByOneAdmin = ((((adminPubKey1Signed + adminPubKey2Signed) + adminPubKey3Signed) + adminPubKeyInvokeSigned) >= 1)
9696 if (if (if (if (if (if (if (isExchangeCall)
9797 then true
9898 else isExchangeCallCPMM)
9999 then true
100100 else isAirdropCall)
101101 then true
102102 else isRoutingCall)
103103 then (size(inv.payments) == 1)
104104 else false)
105105 then true
106106 else if (if (if (if (isUpdateWeightsCall)
107107 then true
108108 else isTakenIntoAccount)
109109 then true
110110 else isTakenIntoAccountCPMM)
111111 then true
112112 else isWriteTotal)
113113 then (size(inv.payments) == 0)
114114 else false)
115115 then signedByOneAdmin
116116 else false)
117117 then isRightFee
118118 else false
119119 case _ =>
120120 let adminPubKey1Signed = if (sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey1))
121121 then 1
122122 else 0
123123 let adminPubKey2Signed = if (sigVerify(tx.bodyBytes, tx.proofs[1], adminPubKey2))
124124 then 1
125125 else 0
126126 let adminPubKey3Signed = if (sigVerify(tx.bodyBytes, tx.proofs[2], adminPubKey3))
127127 then 1
128128 else 0
129129 (((adminPubKey1Signed + adminPubKey2Signed) + adminPubKey3Signed) >= 2)
130130 }
131131

github/deemru/w8io/026f985 
30.59 ms