tx · H8aBgzdKdyNsiarKxTdEnBj1NXnNwEPgdW4MX4kMB8th

3N2eueE5vLLKe8jXuBDbdbKcPaH36yG1Had:  -1.40000000 Waves

2022.10.17 18:55 [2276584] smart account 3N2eueE5vLLKe8jXuBDbdbKcPaH36yG1Had > SELF 0.00000000 Waves

{ "type": 13, "id": "H8aBgzdKdyNsiarKxTdEnBj1NXnNwEPgdW4MX4kMB8th", "fee": 140000000, "feeAssetId": null, "timestamp": 1666021977861, "version": 2, "chainId": 84, "sender": "3N2eueE5vLLKe8jXuBDbdbKcPaH36yG1Had", "senderPublicKey": "EAmZF2D2BbfoPsrMGFAs2UCv8ScAXxhAZRzFpkveca8G", "proofs": [ "zC1EqkP6ALcmvg9XRUBkFTqquNKZ8zkKDtQZFe1HvgFcbpdoXoKjCvrqTgsK1XcYxA1ahbG6Q364QUAKtve9vWP", "2xMgy4Qm2ZmyFyrTWJD5gKHxn14toWKF69YTai7jLxrFDBn8ZYvowNSYYRCDW9KvRB6L58ognid9f5HwTwRMNLrw" ], "script": "base64:AAIFAAAAAAAAAAIIAgAAABEAAAAABm9yYWNsZQkBAAAAB0FkZHJlc3MAAAABAQAAABoBVEgTlwzA0zPMJTKAtin3p2RogKvjzHtLmQEAAAATZ2V0QmFzZTU4RnJvbU9yYWNsZQAAAAEAAAADa2V5BAAAAAckbWF0Y2gwCQAEHQAAAAIFAAAABm9yYWNsZQUAAAADa2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAAZTdHJpbmcEAAAABnN0cmluZwUAAAAHJG1hdGNoMAkAAlkAAAABBQAAAAZzdHJpbmcEAAAAB25vdGhpbmcFAAAAByRtYXRjaDAJAAACAAAAAQkAASwAAAACBQAAAANrZXkCAAAACGlzIGVtcHR5AAAAAA1rQWRtaW5QdWJLZXkxAgAAAAthZG1pbl9wdWJfMQAAAAANa0FkbWluUHViS2V5MgIAAAALYWRtaW5fcHViXzIAAAAADWtBZG1pblB1YktleTMCAAAAC2FkbWluX3B1Yl8z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AAAAAAAAAAAgUAAAAMYWRtaW5QdWJLZXkzAAAAAAAAAAABAAAAAAAAAAAACQAAZwAAAAIJAABkAAAAAgkAAGQAAAACBQAAABJhZG1pblB1YktleTFTaWduZWQFAAAAEmFkbWluUHViS2V5MlNpZ25lZAUAAAASYWRtaW5QdWJLZXkzU2lnbmVkAAAAAAAAAAACmS5c1A==", "height": 2276584, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 87dQbPkFdsaPgsoJMt9K8kdqQjAwyjCmtrcb9ZeQZ1fX Next: 6Jty8CeNV1gfDjamXt8d1QHkTcfENRZrq2FbUQYs7byh Diff:
OldNewDifferences
6060 let isTakenIntoAccount = if (isDefined(getString(oracle, (keyPrefixPoolName + toString(addressFromRecipient(inv.dApp))))))
6161 then (inv.function == "takeIntoAccountExtraFunds")
6262 else false
63+ let isTakenIntoAccountGlobal = (inv.function == "takeIntoAccountExtraFunds")
6364 let isWriteTotal = if ((inv.dApp == surveysAddress))
6465 then (inv.function == "writeTotals")
6566 else false
7071 then (size(inv.payments) == 1)
7172 else false)
7273 then true
73- else if (if (if (if (isUpdateWeightsCall)
74+ else if (if (if (if (if (isUpdateWeightsCall)
7475 then true
7576 else isUpdatePoolInterest)
7677 then true
7778 else isTakenIntoAccount)
7879 then true
7980 else isWriteTotal)
81+ then true
82+ else isTakenIntoAccountGlobal)
8083 then (size(inv.payments) == 0)
8184 else false)
8285 then signedByAdmin
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
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 =>
4848 let isExchangeCall = if (isDefined(getString(oracle, (keyPrefixPoolName + toString(addressFromRecipient(inv.dApp))))))
4949 then (inv.function == "exchange")
5050 else false
5151 let isAirdropCall = if ((inv.dApp == governanceAddress))
5252 then (inv.function == "airDrop")
5353 else false
5454 let isUpdateWeightsCall = if ((inv.dApp == governanceAddress))
5555 then (inv.function == "updateWeights")
5656 else false
5757 let isUpdatePoolInterest = if ((inv.dApp == farmingAddress))
5858 then (inv.function == "updatePoolInterest")
5959 else false
6060 let isTakenIntoAccount = if (isDefined(getString(oracle, (keyPrefixPoolName + toString(addressFromRecipient(inv.dApp))))))
6161 then (inv.function == "takeIntoAccountExtraFunds")
6262 else false
63+ let isTakenIntoAccountGlobal = (inv.function == "takeIntoAccountExtraFunds")
6364 let isWriteTotal = if ((inv.dApp == surveysAddress))
6465 then (inv.function == "writeTotals")
6566 else false
6667 let signedByAdmin = sigVerify(tx.bodyBytes, tx.proofs[0], adminInvoke)
6768 if (if (if (if (isExchangeCall)
6869 then true
6970 else isAirdropCall)
7071 then (size(inv.payments) == 1)
7172 else false)
7273 then true
73- else if (if (if (if (isUpdateWeightsCall)
74+ else if (if (if (if (if (isUpdateWeightsCall)
7475 then true
7576 else isUpdatePoolInterest)
7677 then true
7778 else isTakenIntoAccount)
7879 then true
7980 else isWriteTotal)
81+ then true
82+ else isTakenIntoAccountGlobal)
8083 then (size(inv.payments) == 0)
8184 else false)
8285 then signedByAdmin
8386 else false
8487 case _ =>
8588 let adminPubKey1Signed = if (sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey1))
8689 then 1
8790 else 0
8891 let adminPubKey2Signed = if (sigVerify(tx.bodyBytes, tx.proofs[1], adminPubKey2))
8992 then 1
9093 else 0
9194 let adminPubKey3Signed = if (sigVerify(tx.bodyBytes, tx.proofs[2], adminPubKey3))
9295 then 1
9396 else 0
9497 (((adminPubKey1Signed + adminPubKey2Signed) + adminPubKey3Signed) >= 2)
9598 }
9699

github/deemru/w8io/169f3d6 
230.74 ms