tx · AqGB9YNxmM25YiPHWDzJx88m9kMMvthT1fenhXFyaTmy

3MpePmToiGHKkuV2XpBzk7RmubYDV4bJbpX:  -0.00400000 Waves

2024.05.22 18:34 [3117385] smart account 3MpePmToiGHKkuV2XpBzk7RmubYDV4bJbpX > SELF 0.00000000 Waves

{ "type": 13, "id": "AqGB9YNxmM25YiPHWDzJx88m9kMMvthT1fenhXFyaTmy", "fee": 400000, "feeAssetId": null, "timestamp": 1716392068452, "version": 2, "chainId": 84, "sender": "3MpePmToiGHKkuV2XpBzk7RmubYDV4bJbpX", "senderPublicKey": "BCUzjPTmWkt8H4m728Doj83ascDJ92SVWmZDz81z6Ccw", "proofs": [ "3S7rhDxdBf3Gkyy4KWLkr78KhUViHPg6UmbLMbxvrmv6uH4uEEq2CSxyv1LiMgf1tFQAHZTPeYyrNjgB15H2urTK" ], "script": "base64:BgIRCAISAwoBCBIICgYYGBgYGBgOAAdXYXZlc0lkAgVXQVZFUwAFQXJyMTAJAMwIAgAACQDMCAIAAQkAzAgCAAIJAMwIAgADCQDMCAIABAkAzAgCAAUJAMwIAgAGCQDMCAIABwkAzAgCAAgJAMwIAgAJBQNuaWwAEENvbmZpZ0FkZHJlc3NLZXkCDWNvbmZpZ0FkZHJlc3MAEUlucHV0c1F1YW50aXR5S2V5Ag5pbnB1dHNRdWFudGl0eQANQ29uZmlnQWRkcmVzcwkBEUBleHRyTmF0aXZlKDEwNjIpAQkBEUBleHRyTmF0aXZlKDEwNTMpAgUEdGhpcwUQQ29uZmlnQWRkcmVzc0tleQAOSW5wdXRzUXVhbnRpdHkJARFAZXh0ck5hdGl2ZSgxMDUwKQIFDUNvbmZpZ0FkZHJlc3MFEUlucHV0c1F1YW50aXR5S2V5ARVtYWtlQXNzZXRPcGVyYXRpb25LZXkDBWNoYWluBWFzc2V0CW9wZXJhdGlvbgkAuQkCCQDMCAICDmFzc2V0T3BlcmF0aW9uCQDMCAIFBWNoYWluCQDMCAIFBWFzc2V0CQDMCAIFCW9wZX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EFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECBQUkYWNjMAAAAAEAAgADAAQABQAGAAcACAAJAAoBAnR4AQZ2ZXJpZnkACQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAACAUCdHgPc2VuZGVyUHVibGljS2V56rX3PA==", "height": 3117385, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: none Full:
OldNewDifferences
1-# no script
1+{-# STDLIB_VERSION 6 #-}
2+{-# SCRIPT_TYPE ACCOUNT #-}
3+{-# CONTENT_TYPE DAPP #-}
4+let WavesId = "WAVES"
5+
6+let Arr10 = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
7+
8+let ConfigAddressKey = "configAddress"
9+
10+let InputsQuantityKey = "inputsQuantity"
11+
12+let ConfigAddress = addressFromStringValue(getStringValue(this, ConfigAddressKey))
13+
14+let InputsQuantity = getIntegerValue(ConfigAddress, InputsQuantityKey)
15+
16+func makeAssetOperationKey (chain,asset,operation) = makeString(["assetOperation", chain, asset, operation], "_")
17+
18+
19+func makeChainIdKey (chain) = ("chainId_" + chain)
20+
21+
22+func makeBlacklistedDelegateKey (delegate) = ("blacklistedDelegate_" + delegate)
23+
24+
25+func makeInputAssetIndexKey (chain,asset) = makeString(["inputAssetIndex", chain, asset], "_")
26+
27+
28+func getChainId (chain) = getInteger(ConfigAddress, makeChainIdKey(chain))
29+
30+
31+func getBlacklistedDelegate (delegate) = getBoolean(ConfigAddress, makeBlacklistedDelegateKey(delegate))
32+
33+
34+func getInputAssetIndex (chain,asset) = getIntegerValue(ConfigAddress, makeInputAssetIndexKey(chain, asset))
35+
36+
37+func getAssetOperation (chain,asset,operation) = getInteger(ConfigAddress, makeAssetOperationKey(chain, asset, operation))
38+
39+
40+@Callable(i)
41+func setup (configAddress) = if ((i.caller != this))
42+ then throw("Access denied")
43+ else if ((size(i.payments) != 0))
44+ then throw("Payments are prohibited")
45+ else if ((addressFromString(configAddress) == unit))
46+ then throw(("Invalid configAddress: " + configAddress))
47+ else [StringEntry(ConfigAddressKey, configAddress)]
48+
49+
50+
51+@Callable(i)
52+func applySettings (inputChains,inputAssets,outputChains,outputAssets,assetOperations,delegates) = if ((size(i.payments) != 0))
53+ then throw("Payments are prohibited")
54+ else if ((i.caller == this))
55+ then throw("Self call is prohibited")
56+ else {
57+ let callerAddressStr = toString(i.caller)
58+ let inputChainsSize = size(inputChains)
59+ let inputAssetsSize = size(inputAssets)
60+ let outputChainsSize = size(outputChains)
61+ let outputAssetsSize = size(outputAssets)
62+ let assetOperationsSize = size(assetOperations)
63+ let delegatesSize = size(delegates)
64+ if (if (if (if (if (if ((InputsQuantity != inputChainsSize))
65+ then true
66+ else (inputChainsSize != inputAssetsSize))
67+ then true
68+ else (inputAssetsSize != outputChainsSize))
69+ then true
70+ else (outputChainsSize != outputAssetsSize))
71+ then true
72+ else (outputAssetsSize != assetOperationsSize))
73+ then true
74+ else (assetOperationsSize != delegatesSize))
75+ then throw("Mismatch argument sizes")
76+ else {
77+ func settingsFold (accum,index) = if ((index >= InputsQuantity))
78+ then accum
79+ else {
80+ let inputChain = inputChains[index]
81+ if ((getChainId(inputChain) == unit))
82+ then throw(("Invalid chain: " + inputChain))
83+ else {
84+ let inputAsset = inputAssets[index]
85+ if ((getInputAssetIndex(inputChain, inputAsset) != index))
86+ then throw(((("Invalid inputAsset: " + inputChain) + ",") + inputAsset))
87+ else {
88+ let outputChain = outputChains[index]
89+ if ((getChainId(outputChain) == unit))
90+ then throw(("Invalid chain: " + outputChain))
91+ else {
92+ let outputAsset = outputAssets[index]
93+ let operation = assetOperations[index]
94+ if ((getAssetOperation(outputChain, outputAsset, operation) == unit))
95+ then throw(((((("Invalid arguments: " + outputChain) + ",") + outputAsset) + ",") + operation))
96+ else {
97+ let delegate = delegates[index]
98+ if ((getBlacklistedDelegate(delegate) != unit))
99+ then throw(("Prohibited delegate: " + delegate))
100+ else {
101+ let isValidWavesAddress = (addressFromString(delegate) != unit)
102+ let isValidEthAddress = if ((take(delegate, 2) == "0x"))
103+ then (size(fromBase16String(drop(delegate, 2))) == 20)
104+ else false
105+ if (!(if (if ((outputChain == WavesId))
106+ then isValidWavesAddress
107+ else false)
108+ then true
109+ else if ((outputChain != WavesId))
110+ then isValidEthAddress
111+ else false))
112+ then throw(("Invalid delegate: " + delegate))
113+ else {
114+ let settingsKey = makeString(["settings", callerAddressStr, inputChain, inputAsset], "_")
115+ let settingsValue = makeString([outputChain, outputAsset, operation, delegate], "_")
116+ (accum :+ StringEntry(settingsKey, settingsValue))
117+ }
118+ }
119+ }
120+ }
121+ }
122+ }
123+ }
124+
125+ let $l = Arr10
126+ let $s = size($l)
127+ let $acc0 = nil
128+ func $f0_1 ($a,$i) = if (($i >= $s))
129+ then $a
130+ else settingsFold($a, $l[$i])
131+
132+ func $f0_2 ($a,$i) = if (($i >= $s))
133+ then $a
134+ else throw("List size exceeds 10")
135+
136+ $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10)
137+ }
138+ }
139+
140+
141+@Verifier(tx)
142+func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
143+

github/deemru/w8io/026f985 
18.91 ms