tx · 4sG2WDvTYn8rhHwucNV71xNEdz9hpTE9CVXaxVxubtAB

3MwwXqqNtNyPD1U9Rov5ygG9bCUGJeJMTy2:  -0.09000000 Waves

2023.03.09 07:10 [2482054] smart account 3MwwXqqNtNyPD1U9Rov5ygG9bCUGJeJMTy2 > SELF 0.00000000 Waves

{ "type": 13, "id": "4sG2WDvTYn8rhHwucNV71xNEdz9hpTE9CVXaxVxubtAB", "fee": 9000000, "feeAssetId": null, "timestamp": 1678334962441, "version": 2, "chainId": 84, "sender": "3MwwXqqNtNyPD1U9Rov5ygG9bCUGJeJMTy2", "senderPublicKey": "GCbdokkxJFr9rj5258VmEVbDP4sQVUmXoiMz5hMRXa9S", "proofs": [ "TapnasuiMBWTVrobWjynqzaXAmSAxjeELFdQoipM8UNqFafZ9pinbML1zuK9waBcFzLDUmmL3Bi4rzxkk1HEE7Q" ], "script": "base64:AAIFAAAAAAAAABkIAhIECgIYGBIECgIICBIDCgEIEgQKAggIAAAACAAAAAADd3ZzAAAAAAAF9eEAAAAAAAR1c2RzAAAAAAAAAABkAAAAAARydWJzAAAAAAAAAABkAAAAAAxkZXBvc2l0X2FkZHIJAQAAAAdBZGRyZXNzAAAAAQEAAAAaAVQYDlxBU2n7d7Bz7F/91r3AUYtaVUA5ffsAAAAADG9wdGlvbnNfYWRkcgkBAAAAB0FkZHJlc3MAAAABAQAAABoBVEFb+Cv2F+oqocvEivH7x7uyIGEx/ocgwQAAAAAEdFJVQgEAAAAgv7I1LEj/fS4nZAGEmW42z/vK94nfeiKN08fw7a6U2ZsAAAAABHRVU0QBAAAAIKskSmq2Qkbr0vzjebBhusOuaVdNUnrKRRynQB0RsCkOAAAAAAdxX3N0YXJ0CQAAaAAAAAIAAAAAAAAAJxAFAAAABHVzZHMAAAAEAAAAAWkBAAAACnNldE9wdGlvbnMAAAACAAAABG9wdHMAAAAEdmFscwQAAAAIb3B0X3NpemUJAAGQAAAAAQUAAAAEb3B0cwMJAABnAAAAAgAAAAAAAAAAZAU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oMAUAAAACdHgJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5st1jCA==", "height": 2482054, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 62C8Dz4zKtZPKEdYXC3deU4CNAf9LP11qhyQoaHAZoTa Next: FJ5wdGWGuuvNjVReHjoq71gnpQNqmEZnCgmoJZ1iBDNz Diff:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4+let wvs = 100000000
45
6+let usds = 100
7+
8+let rubs = 100
9+
10+let deposit_addr = Address(base58'3Mr7HCJPTazuYjJbfbbpRMvZX8xrNTjT1Kx')
11+
12+let options_addr = Address(base58'3MusfsY6PqDh1YnF7YyTi5ffVT16Dm2bqf6')
13+
14+let tRUB = base58'DuJUjEZJWmpFUo3bubFX8tomUVitqZZNAPuhd6KWgJNE'
15+
16+let tUSD = base58'CX4p6XcuSBUvv44r1avCqYka5PYAVzBK5hSXaT7maU85'
17+
18+let q_start = (10000 * usds)
519
620 @Callable(i)
721 func setOptions (opts,vals) = {
822 let opt_size = size(opts)
923 if ((100 >= opt_size))
1024 then {
11- let options_addr = Address(base58'3MusfsY6PqDh1YnF7YyTi5ffVT16Dm2bqf6')
1225 let adminList = match getString(options_addr, "admin_list") {
1326 case _: Unit =>
1427 "unset"
1831 throw("Match error")
1932 }
2033 func addStringEntry (accum,nextValue) = {
21- let $t0557580 = accum
22- let result = $t0557580._1
23- let j = $t0557580._2
34+ let $t0824847 = accum
35+ let result = $t0824847._1
36+ let j = $t0824847._2
2437 $Tuple2((result :+ StringEntry(opts[j], nextValue)), (j + 1))
2538 }
2639
6881
6982 @Callable(i)
7083 func setOption (variable,value) = {
71- let options_addr = Address(base58'3MusfsY6PqDh1YnF7YyTi5ffVT16Dm2bqf6')
7284 let adminList = match getString(options_addr, "admin_list") {
7385 case _: Unit =>
7486 "unset"
100112
101113 @Callable(i)
102114 func delOption (variable) = {
103- let options_addr = Address(base58'3MusfsY6PqDh1YnF7YyTi5ffVT16Dm2bqf6')
104115 let adminList = match getString(options_addr, "admin_list") {
105116 case _: Unit =>
106117 "unset"
138149 case _ =>
139150 "unset"
140151 }
141- let tUSD = base58'CX4p6XcuSBUvv44r1avCqYka5PYAVzBK5hSXaT7maU85'
142152 if ((isKnownCaller == "unset"))
143- then $Tuple2([StringEntry(toBase58String(i.caller.bytes), data), ScriptTransfer(i.caller, 1000000, tUSD)], unit)
153+ then {
154+ let res = invoke(options_addr, "reissueForDepAddr", [q_start], nil)
155+ if ((res == res))
156+ then match res {
157+ case r: String =>
158+ $Tuple2([StringEntry(toBase58String(i.caller.bytes), data), ScriptTransfer(i.caller, q_start, tUSD)], unit)
159+ case _ =>
160+ throw({
161+ let @ = res
162+ if ($isInstanceOf(@, "String"))
163+ then @
164+ else throw("Couldn't cast Any to String")
165+ })
166+ }
167+ else throw("Strict value is not equal to itself.")
168+ }
144169 else throw("Can be used only once")
145170 }
146171
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4+let wvs = 100000000
45
6+let usds = 100
7+
8+let rubs = 100
9+
10+let deposit_addr = Address(base58'3Mr7HCJPTazuYjJbfbbpRMvZX8xrNTjT1Kx')
11+
12+let options_addr = Address(base58'3MusfsY6PqDh1YnF7YyTi5ffVT16Dm2bqf6')
13+
14+let tRUB = base58'DuJUjEZJWmpFUo3bubFX8tomUVitqZZNAPuhd6KWgJNE'
15+
16+let tUSD = base58'CX4p6XcuSBUvv44r1avCqYka5PYAVzBK5hSXaT7maU85'
17+
18+let q_start = (10000 * usds)
519
620 @Callable(i)
721 func setOptions (opts,vals) = {
822 let opt_size = size(opts)
923 if ((100 >= opt_size))
1024 then {
11- let options_addr = Address(base58'3MusfsY6PqDh1YnF7YyTi5ffVT16Dm2bqf6')
1225 let adminList = match getString(options_addr, "admin_list") {
1326 case _: Unit =>
1427 "unset"
1528 case x: String =>
1629 x
1730 case _ =>
1831 throw("Match error")
1932 }
2033 func addStringEntry (accum,nextValue) = {
21- let $t0557580 = accum
22- let result = $t0557580._1
23- let j = $t0557580._2
34+ let $t0824847 = accum
35+ let result = $t0824847._1
36+ let j = $t0824847._2
2437 $Tuple2((result :+ StringEntry(opts[j], nextValue)), (j + 1))
2538 }
2639
2740 let r = {
2841 let $l = vals
2942 let $s = size($l)
3043 let $acc0 = $Tuple2(nil, 0)
3144 func $f0_1 ($a,$i) = if (($i >= $s))
3245 then $a
3346 else addStringEntry($a, $l[$i])
3447
3548 func $f0_2 ($a,$i) = if (($i >= $s))
3649 then $a
3750 else throw("List size exceeds 100")
3851
3952 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($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), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50), 51), 52), 53), 54), 55), 56), 57), 58), 59), 60), 61), 62), 63), 64), 65), 66), 67), 68), 69), 70), 71), 72), 73), 74), 75), 76), 77), 78), 79), 80), 81), 82), 83), 84), 85), 86), 87), 88), 89), 90), 91), 92), 93), 94), 95), 96), 97), 98), 99), 100)
4053 }
4154 let callerAddressStr = toString(i.caller)
4255 if ((adminList != "unset"))
4356 then {
4457 let test = getString(addressFromStringValue(adminList), callerAddressStr)
4558 let isAdmin = match test {
4659 case x: String =>
4760 x
4861 case _: Unit =>
4962 "no admin"
5063 case _ =>
5164 throw("Match error")
5265 }
5366 func add_elm (options) = {
5467 let opt = split(options, "|")
5568 StringEntry(opt[0], opt[1])
5669 }
5770
5871 if ((isAdmin != "no admin"))
5972 then r
6073 else throw((((((("You not admin: " + adminList) + ", isAdmin: ") + isAdmin) + ", callerAddressStr: ") + callerAddressStr) + ", "))
6174 }
6275 else throw("Unset admin list")
6376 }
6477 else throw("The number of list elements must not exceed 100")
6578 }
6679
6780
6881
6982 @Callable(i)
7083 func setOption (variable,value) = {
71- let options_addr = Address(base58'3MusfsY6PqDh1YnF7YyTi5ffVT16Dm2bqf6')
7284 let adminList = match getString(options_addr, "admin_list") {
7385 case _: Unit =>
7486 "unset"
7587 case x: String =>
7688 x
7789 case _ =>
7890 throw("Match error")
7991 }
8092 let callerAddressStr = toString(i.caller)
8193 if ((adminList != "unset"))
8294 then {
8395 let test = getString(addressFromStringValue(adminList), callerAddressStr)
8496 let isAdmin = match test {
8597 case x: String =>
8698 x
8799 case _: Unit =>
88100 "no admin"
89101 case _ =>
90102 throw("Match error")
91103 }
92104 if ((isAdmin != "no admin"))
93105 then $Tuple2([StringEntry(variable, value)], unit)
94106 else throw((((((("You not admin: " + adminList) + ", isAdmin: ") + isAdmin) + ", callerAddressStr: ") + callerAddressStr) + ", "))
95107 }
96108 else throw("Unset admin list")
97109 }
98110
99111
100112
101113 @Callable(i)
102114 func delOption (variable) = {
103- let options_addr = Address(base58'3MusfsY6PqDh1YnF7YyTi5ffVT16Dm2bqf6')
104115 let adminList = match getString(options_addr, "admin_list") {
105116 case _: Unit =>
106117 "unset"
107118 case x: String =>
108119 x
109120 case _ =>
110121 throw("Match error")
111122 }
112123 let callerAddressStr = toString(i.caller)
113124 if ((adminList != "unset"))
114125 then {
115126 let test = getString(addressFromStringValue(adminList), callerAddressStr)
116127 let isAdmin = match test {
117128 case x: String =>
118129 x
119130 case _: Unit =>
120131 "no admin"
121132 case _ =>
122133 throw("Match error")
123134 }
124135 if ((isAdmin != "no admin"))
125136 then $Tuple2([DeleteEntry(variable)], unit)
126137 else throw((((((("You not admin: " + adminList) + ", isAdmin: ") + isAdmin) + ", callerAddressStr: ") + callerAddressStr) + ", "))
127138 }
128139 else throw("Unset admin list")
129140 }
130141
131142
132143
133144 @Callable(i)
134145 func regProvider (provider,data) = {
135146 let isKnownCaller = match getString(this, toBase58String(i.caller.bytes)) {
136147 case hist: String =>
137148 hist
138149 case _ =>
139150 "unset"
140151 }
141- let tUSD = base58'CX4p6XcuSBUvv44r1avCqYka5PYAVzBK5hSXaT7maU85'
142152 if ((isKnownCaller == "unset"))
143- then $Tuple2([StringEntry(toBase58String(i.caller.bytes), data), ScriptTransfer(i.caller, 1000000, tUSD)], unit)
153+ then {
154+ let res = invoke(options_addr, "reissueForDepAddr", [q_start], nil)
155+ if ((res == res))
156+ then match res {
157+ case r: String =>
158+ $Tuple2([StringEntry(toBase58String(i.caller.bytes), data), ScriptTransfer(i.caller, q_start, tUSD)], unit)
159+ case _ =>
160+ throw({
161+ let @ = res
162+ if ($isInstanceOf(@, "String"))
163+ then @
164+ else throw("Couldn't cast Any to String")
165+ })
166+ }
167+ else throw("Strict value is not equal to itself.")
168+ }
144169 else throw("Can be used only once")
145170 }
146171
147172
148173 @Verifier(tx)
149174 func verify () = match tx {
150175 case _ =>
151176 sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
152177 }
153178

github/deemru/w8io/169f3d6 
45.23 ms