tx · BFvYmLvnhrXDY1kgaRohJuLQP9uuaDQD1Pju5wb87tyA

3NAGTtZz6WpupSN89NZD5rMZwwziZEg4Kx4:  -0.05000000 Waves

2022.04.12 19:29 [2005600] smart account 3NAGTtZz6WpupSN89NZD5rMZwwziZEg4Kx4 > SELF 0.00000000 Waves

{ "type": 13, "id": "BFvYmLvnhrXDY1kgaRohJuLQP9uuaDQD1Pju5wb87tyA", "fee": 5000000, "feeAssetId": null, "timestamp": 1649780905540, "version": 2, "chainId": 84, "sender": "3NAGTtZz6WpupSN89NZD5rMZwwziZEg4Kx4", "senderPublicKey": "5CqqMkmtXXt35KRH9LdWA3ap6TffPvTT5SHQzYrVFbBw", "proofs": [ "Gew14BFqAMWECHXPfDDgxXDFcd3r5Aaf6uCm7SPPxPwM6DDsZgwxFvUknwvEZuh8xgt2Bbyu1M5HSWPhKw7U6zQ", "629BcSPW1Lpwwviu6m7TKx7WdPWaJt14oEkaZB4Qib2dvE4xQd3bzEiAbPDa5iuquEYBxLcBGcXc5ngv1TjHLc77" ], "script": "base64:AAIEAAAAAAAAAAIIAgAAABEAAAAABm9yYWNsZQkBAAAAB0FkZHJlc3MAAAABAQAAABoBVOlFqh6QLzqu8boO5i6akl8amITh82KzCAEAAAATZ2V0QmFzZTU4RnJvbU9yYWNsZQAAAAEAAAADa2V5BAAAAAckbWF0Y2gwCQAEHQAAAAIFAAAABm9yYWNsZQUAAAADa2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAAZTdHJpbmcEAAAABnN0cmluZwUAAAAHJG1hdGNoMAkAAlkAAAABBQAAAAZzdHJpbmcEAAAAB25vdGhpbmcFAAAAByRtYXRjaDAJAAACAAAAAQkAASwAAAACBQAAAANrZXkCAAAACGlzIGVtcHR5AAAAAA1rQWRtaW5QdWJLZXkxAgAAAAthZG1pbl9wdWJfMQAAAAANa0FkbWluUHViS2V5MgIAAAALYWRtaW5fcHViXzIAAAAADWtBZG1pblB1YktleTMCAAAAC2FkbWluX3B1Y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JAABkAAAAAgUAAAASYWRtaW5QdWJLZXkxU2lnbmVkBQAAABJhZG1pblB1YktleTJTaWduZWQFAAAAEmFkbWluUHViS2V5M1NpZ25lZAAAAAAAAAAAAltcYFI=", "height": 2005600, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 91t6MwCENtSTq864kxaZHMDYVR69NJEoHLuyivfx1DYB Next: none Diff:
OldNewDifferences
11 {-# STDLIB_VERSION 4 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-let governanceAddress = Address(base58'3N5W8da2iiijVieA6qLGo7KzCJj8B19smWU')
4+let oracle = Address(base58'3NBBWfzZtZtszaXbitTKnrB2xXwv26Bn7H9')
55
6-let farmingAddress = Address(base58'3MsxHxruYWoddB4HRiPBYAWtMXMtCF1V9XT')
6+func getBase58FromOracle (key) = match getString(oracle, key) {
7+ case string: String =>
8+ fromBase58String(string)
9+ case nothing =>
10+ throw((key + "is empty"))
11+}
712
8-let oracleAddress = Address(base58'3NBBWfzZtZtszaXbitTKnrB2xXwv26Bn7H9')
913
10-let adminInvoke = base58'Kn7NpzaG12dLZgcHf2ipUftU6hbJygmrhFqQYE4B7ZK'
14+let kAdminPubKey1 = "admin_pub_1"
1115
12-let adminPubKey1 = base58'GFmKZ2naZFRoCvNbwKAQVGmLb1uBeWGDgFabdGBuZiuy'
16+let kAdminPubKey2 = "admin_pub_2"
1317
14-let adminPubKey2 = base58'GmJXRyhRA79g8yUGgKBAVdnFfQFDMjQG98b1MmLDh5kk'
18+let kAdminPubKey3 = "admin_pub_3"
1519
16-let adminPubKey3 = base58'CFhbV6h41hVjbGHudGtS3fYUv7QAKRxFQzKNtx4B5PqP'
20+let kAdminInvokePubKey = "admin_invoke_pub"
21+
22+let kGovAddress = "governance_address"
23+
24+let kFarmAddress = "farming_address"
25+
26+let kSurveysAddress = "surveys_address"
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+let governanceAddress = Address(getBase58FromOracle(kGovAddress))
37+
38+let farmingAddress = Address(getBase58FromOracle(kFarmAddress))
39+
40+let surveysAddress = Address(getBase58FromOracle(kSurveysAddress))
1741
1842 let keyPrefixPoolName = "pool_"
1943
2145 @Verifier(tx)
2246 func verify () = match tx {
2347 case invoke: InvokeScriptTransaction =>
24- let isExchangeCall = if (isDefined(getString(oracleAddress, (keyPrefixPoolName + toString(addressFromRecipient(invoke.dApp))))))
48+ let isExchangeCall = if (isDefined(getString(oracle, (keyPrefixPoolName + toString(addressFromRecipient(invoke.dApp))))))
2549 then (invoke.function == "exchange")
2650 else false
2751 let isAirdropCall = if ((invoke.dApp == governanceAddress))
3357 let isUpdatePoolInterest = if ((invoke.dApp == farmingAddress))
3458 then (invoke.function == "updatePoolInterest")
3559 else false
36- let isTakenIntoAccount = if (isDefined(getString(oracleAddress, (keyPrefixPoolName + toString(addressFromRecipient(invoke.dApp))))))
60+ let isTakenIntoAccount = if (isDefined(getString(oracle, (keyPrefixPoolName + toString(addressFromRecipient(invoke.dApp))))))
3761 then (invoke.function == "takeIntoAccountExtraFunds")
62+ else false
63+ let isWriteTotal = if ((invoke.dApp == surveysAddress))
64+ then (invoke.function == "writeTotals")
3865 else false
3966 let signedByAdmin = sigVerify(tx.bodyBytes, tx.proofs[0], adminInvoke)
4067 if (if (if (if (isExchangeCall)
4370 then (size(invoke.payments) == 1)
4471 else false)
4572 then true
46- else if (if (if (isUpdateWeightsCall)
73+ else if (if (if (if (isUpdateWeightsCall)
4774 then true
4875 else isUpdatePoolInterest)
4976 then true
5077 else isTakenIntoAccount)
78+ then true
79+ else isWriteTotal)
5180 then (size(invoke.payments) == 0)
5281 else false)
5382 then signedByAdmin
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 4 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-let governanceAddress = Address(base58'3N5W8da2iiijVieA6qLGo7KzCJj8B19smWU')
4+let oracle = Address(base58'3NBBWfzZtZtszaXbitTKnrB2xXwv26Bn7H9')
55
6-let farmingAddress = Address(base58'3MsxHxruYWoddB4HRiPBYAWtMXMtCF1V9XT')
6+func getBase58FromOracle (key) = match getString(oracle, key) {
7+ case string: String =>
8+ fromBase58String(string)
9+ case nothing =>
10+ throw((key + "is empty"))
11+}
712
8-let oracleAddress = Address(base58'3NBBWfzZtZtszaXbitTKnrB2xXwv26Bn7H9')
913
10-let adminInvoke = base58'Kn7NpzaG12dLZgcHf2ipUftU6hbJygmrhFqQYE4B7ZK'
14+let kAdminPubKey1 = "admin_pub_1"
1115
12-let adminPubKey1 = base58'GFmKZ2naZFRoCvNbwKAQVGmLb1uBeWGDgFabdGBuZiuy'
16+let kAdminPubKey2 = "admin_pub_2"
1317
14-let adminPubKey2 = base58'GmJXRyhRA79g8yUGgKBAVdnFfQFDMjQG98b1MmLDh5kk'
18+let kAdminPubKey3 = "admin_pub_3"
1519
16-let adminPubKey3 = base58'CFhbV6h41hVjbGHudGtS3fYUv7QAKRxFQzKNtx4B5PqP'
20+let kAdminInvokePubKey = "admin_invoke_pub"
21+
22+let kGovAddress = "governance_address"
23+
24+let kFarmAddress = "farming_address"
25+
26+let kSurveysAddress = "surveys_address"
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+let governanceAddress = Address(getBase58FromOracle(kGovAddress))
37+
38+let farmingAddress = Address(getBase58FromOracle(kFarmAddress))
39+
40+let surveysAddress = Address(getBase58FromOracle(kSurveysAddress))
1741
1842 let keyPrefixPoolName = "pool_"
1943
2044
2145 @Verifier(tx)
2246 func verify () = match tx {
2347 case invoke: InvokeScriptTransaction =>
24- let isExchangeCall = if (isDefined(getString(oracleAddress, (keyPrefixPoolName + toString(addressFromRecipient(invoke.dApp))))))
48+ let isExchangeCall = if (isDefined(getString(oracle, (keyPrefixPoolName + toString(addressFromRecipient(invoke.dApp))))))
2549 then (invoke.function == "exchange")
2650 else false
2751 let isAirdropCall = if ((invoke.dApp == governanceAddress))
2852 then (invoke.function == "airDrop")
2953 else false
3054 let isUpdateWeightsCall = if ((invoke.dApp == governanceAddress))
3155 then (invoke.function == "updateWeights")
3256 else false
3357 let isUpdatePoolInterest = if ((invoke.dApp == farmingAddress))
3458 then (invoke.function == "updatePoolInterest")
3559 else false
36- let isTakenIntoAccount = if (isDefined(getString(oracleAddress, (keyPrefixPoolName + toString(addressFromRecipient(invoke.dApp))))))
60+ let isTakenIntoAccount = if (isDefined(getString(oracle, (keyPrefixPoolName + toString(addressFromRecipient(invoke.dApp))))))
3761 then (invoke.function == "takeIntoAccountExtraFunds")
62+ else false
63+ let isWriteTotal = if ((invoke.dApp == surveysAddress))
64+ then (invoke.function == "writeTotals")
3865 else false
3966 let signedByAdmin = sigVerify(tx.bodyBytes, tx.proofs[0], adminInvoke)
4067 if (if (if (if (isExchangeCall)
4168 then true
4269 else isAirdropCall)
4370 then (size(invoke.payments) == 1)
4471 else false)
4572 then true
46- else if (if (if (isUpdateWeightsCall)
73+ else if (if (if (if (isUpdateWeightsCall)
4774 then true
4875 else isUpdatePoolInterest)
4976 then true
5077 else isTakenIntoAccount)
78+ then true
79+ else isWriteTotal)
5180 then (size(invoke.payments) == 0)
5281 else false)
5382 then signedByAdmin
5483 else false
5584 case _ =>
5685 let adminPubKey1Signed = if (sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey1))
5786 then 1
5887 else 0
5988 let adminPubKey2Signed = if (sigVerify(tx.bodyBytes, tx.proofs[1], adminPubKey2))
6089 then 1
6190 else 0
6291 let adminPubKey3Signed = if (sigVerify(tx.bodyBytes, tx.proofs[2], adminPubKey3))
6392 then 1
6493 else 0
6594 (((adminPubKey1Signed + adminPubKey2Signed) + adminPubKey3Signed) >= 2)
6695 }
6796

github/deemru/w8io/026f985 
35.77 ms