tx · 8eUvo2sFT22UkxvQaP4LsHUY9oVfLV4kSFPfoyAkJGqD

3N8UaqrCTjypGPWXSvFJVSLv23bfuiPoJAh:  -0.01000000 Waves

2023.01.06 03:11 [2392358] smart account 3N8UaqrCTjypGPWXSvFJVSLv23bfuiPoJAh > SELF 0.00000000 Waves

{ "type": 13, "id": "8eUvo2sFT22UkxvQaP4LsHUY9oVfLV4kSFPfoyAkJGqD", "fee": 1000000, "feeAssetId": null, "timestamp": 1672963902083, "version": 2, "chainId": 84, "sender": "3N8UaqrCTjypGPWXSvFJVSLv23bfuiPoJAh", "senderPublicKey": "6Q6JdfeHgdjpVbDxjoVAbQhxeGaQXS7B4WYGzk2tYsGT", "proofs": [ "2AgkkVFz2y9s54cG2Ht4QFuWr6vBWVk3uFQbRRomqvk1ULYrzmDeVmTrALwL8NfqQSyeMYVgRF8hb8vAWZ7Bwok9" ], "script": "base64:BgI2CAISAwoBBBIHCgUEBAQEBBIECgIBARIDCgEEEgMKAQQSAwoBCBIDCgEBEgQKAggBEgQKAggBEwACYW8CCGFkZHJlc3NfAAJhYwIIYWN0aXZhdGUABnBvb2xBYwIOYWN0aXZhdGVfcG9vbHMABnN3YXBBYwINYWN0aXZhdGVfc3dhcAAGbmZldEFjAgxhY3RpdmF0ZV9uZnQAC2xpcXVpZGl0eUFjAhJhY3RpdmF0ZV9saXF1aWRpdHkAA2JjRAITYmxvY2tfZGlzdHJpYnVpdGlvbgAJYnJpZGdlc0FjAhBhY3RpdmF0ZV9icmlkZ2VzAANhQUQCBWFkbWluAAJvQwIHb3JhY2xlXwACb1QCDHRvdGFsX29yYWNsZQAFd2F2ZXMCBVdBVkVTAAZhV2F2ZXMCDGFjY2VwdF93YXZlcwAFV0FWRVMFBHVuaXQBEWFkbWluVmVyaWZpY2F0aW9uAQFpBAckbWF0Y2gwCQCdCAIFBHRoaXMCBWFkbWluAwkAAQIFByRtYXRjaDACBlN0cmluZwQBdAUHJG1hdGNoMAkAAAIJAQdBZGRyZXNzA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9yQWRtaW4Av5WpUA==", "height": 2392358, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: AqRvNzuL98Npfvtecw7r6A5YkbV2EaKvCcGzymSyTwQt Next: EMtK1S8XUS4H9wVLNYcpSNMMe9EpMemYeJJjAWiXXNcD Diff:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4+let ao = "address_"
5+
46 let ac = "activate"
57
68 let poolAc = "activate_pools"
79
810 let swapAc = "activate_swap"
11+
12+let nfetAc = "activate_nft"
913
1014 let liquidityAc = "activate_liquidity"
1115
1923
2024 let oT = "total_oracle"
2125
26+let waves = "WAVES"
27+
2228 let aWaves = "accept_waves"
2329
24-func adminVerification () = match getString(this, "admin") {
30+let WAVES = unit
31+
32+func adminVerification (i) = match getString(this, "admin") {
2533 case t: String =>
26- Address(fromBase58String(t))
34+ (Address(fromBase58String(t)) == i.caller)
2735 case _ =>
28- this
36+ (this == i.caller)
2937 }
3038
3139
32-let rateFee = "percentage_rate_fee"
40+let rateFee = "percentage_rate_fee_swap"
41+
42+let rateFeeLimit = "rate_fee_limit"
43+
44+let rateFeeHeight = "rate_fee_height"
3345
3446 let errorAdmin = "Only the Admin itself can invoke this function"
3547
3648 @Callable(i)
37-func activate (v) = if (if ((i.caller == this))
38- then true
39- else (i.caller == adminVerification()))
49+func activate (v) = if (adminVerification(i))
4050 then [BooleanEntry(ac, v)]
4151 else throw(errorAdmin)
4252
4353
4454
4555 @Callable(i)
46-func maintenance (pools,swap,stake,bridges) = if (if ((i.caller == this))
47- then true
48- else (i.caller == adminVerification()))
49- then [BooleanEntry(poolAc, pools), BooleanEntry(swapAc, swap), BooleanEntry(liquidityAc, stake), BooleanEntry(bridgesAc, bridges)]
56+func maintenance (pools,swap,stake,bridges,nft) = if (adminVerification(i))
57+ then [BooleanEntry(poolAc, pools), BooleanEntry(swapAc, swap), BooleanEntry(liquidityAc, stake), BooleanEntry(bridgesAc, bridges), BooleanEntry(nfetAc, nft)]
5058 else throw(errorAdmin)
5159
5260
5361
5462 @Callable(i)
55-func percentualRateFeeSwapEdit (rate) = if (if ((i.caller == this))
56- then true
57- else (i.caller == adminVerification()))
58- then [IntegerEntry(rateFee, rate)]
63+func RateFee (rateSwap,limitHeight) = if (adminVerification(i))
64+ then [IntegerEntry(rateFee, rateSwap), IntegerEntry(rateFeeHeight, limitHeight), IntegerEntry(rateFeeLimit, 100000000000000000)]
5965 else throw(errorAdmin)
6066
6167
6268
6369 @Callable(i)
64-func acceptWaves (activate) = if (if ((i.caller == this))
65- then true
66- else (i.caller == adminVerification()))
70+func recommendation (activate) = if (adminVerification(i))
71+ then [BooleanEntry("RECOMMENDATION", activate)]
72+ else throw(errorAdmin)
73+
74+
75+
76+@Callable(i)
77+func acceptWaves (activate) = if (adminVerification(i))
6778 then [BooleanEntry(aWaves, activate)]
6879 else throw(errorAdmin)
6980
7081
7182
7283 @Callable(i)
73-func addAdmin (address) = if (if ((i.caller == this))
74- then true
75- else (i.caller == adminVerification()))
84+func addAdmin (address) = if (adminVerification(i))
7685 then [StringEntry(aAD, address)]
7786 else throw(errorAdmin)
7887
7988
8089
8190 @Callable(i)
82-func BlockDistribution (amount) = if (if ((i.caller == this))
83- then true
84- else (i.caller == adminVerification()))
91+func BlockDistribution (amount) = if (adminVerification(i))
8592 then [IntegerEntry(bcD, amount)]
8693 else throw(errorAdmin)
8794
8895
8996
9097 @Callable(i)
91-func SetOracle (address,number) = if (if ((i.caller == this))
92- then true
93- else (i.caller == adminVerification()))
98+func SetOracle (address,number) = if (adminVerification(i))
9499 then [StringEntry((oC + toString(number)), address), IntegerEntry(oT, number)]
95100 else throw(errorAdmin)
101+
102+
103+
104+@Callable(i)
105+func Set (address,T) = {
106+ let ki = if ((T == 1))
107+ then (ao + "IDO")
108+ else if ((T == 2))
109+ then (ao + "BRIDGES")
110+ else if ((T == 3))
111+ then (ao + "FARMS")
112+ else if ((T == 4))
113+ then (ao + "POOLS")
114+ else (ao + "NFT")
115+ if (adminVerification(i))
116+ then [StringEntry(ki, address)]
117+ else throw(errorAdmin)
118+ }
96119
97120
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4+let ao = "address_"
5+
46 let ac = "activate"
57
68 let poolAc = "activate_pools"
79
810 let swapAc = "activate_swap"
11+
12+let nfetAc = "activate_nft"
913
1014 let liquidityAc = "activate_liquidity"
1115
1216 let bcD = "block_distribuition"
1317
1418 let bridgesAc = "activate_bridges"
1519
1620 let aAD = "admin"
1721
1822 let oC = "oracle_"
1923
2024 let oT = "total_oracle"
2125
26+let waves = "WAVES"
27+
2228 let aWaves = "accept_waves"
2329
24-func adminVerification () = match getString(this, "admin") {
30+let WAVES = unit
31+
32+func adminVerification (i) = match getString(this, "admin") {
2533 case t: String =>
26- Address(fromBase58String(t))
34+ (Address(fromBase58String(t)) == i.caller)
2735 case _ =>
28- this
36+ (this == i.caller)
2937 }
3038
3139
32-let rateFee = "percentage_rate_fee"
40+let rateFee = "percentage_rate_fee_swap"
41+
42+let rateFeeLimit = "rate_fee_limit"
43+
44+let rateFeeHeight = "rate_fee_height"
3345
3446 let errorAdmin = "Only the Admin itself can invoke this function"
3547
3648 @Callable(i)
37-func activate (v) = if (if ((i.caller == this))
38- then true
39- else (i.caller == adminVerification()))
49+func activate (v) = if (adminVerification(i))
4050 then [BooleanEntry(ac, v)]
4151 else throw(errorAdmin)
4252
4353
4454
4555 @Callable(i)
46-func maintenance (pools,swap,stake,bridges) = if (if ((i.caller == this))
47- then true
48- else (i.caller == adminVerification()))
49- then [BooleanEntry(poolAc, pools), BooleanEntry(swapAc, swap), BooleanEntry(liquidityAc, stake), BooleanEntry(bridgesAc, bridges)]
56+func maintenance (pools,swap,stake,bridges,nft) = if (adminVerification(i))
57+ then [BooleanEntry(poolAc, pools), BooleanEntry(swapAc, swap), BooleanEntry(liquidityAc, stake), BooleanEntry(bridgesAc, bridges), BooleanEntry(nfetAc, nft)]
5058 else throw(errorAdmin)
5159
5260
5361
5462 @Callable(i)
55-func percentualRateFeeSwapEdit (rate) = if (if ((i.caller == this))
56- then true
57- else (i.caller == adminVerification()))
58- then [IntegerEntry(rateFee, rate)]
63+func RateFee (rateSwap,limitHeight) = if (adminVerification(i))
64+ then [IntegerEntry(rateFee, rateSwap), IntegerEntry(rateFeeHeight, limitHeight), IntegerEntry(rateFeeLimit, 100000000000000000)]
5965 else throw(errorAdmin)
6066
6167
6268
6369 @Callable(i)
64-func acceptWaves (activate) = if (if ((i.caller == this))
65- then true
66- else (i.caller == adminVerification()))
70+func recommendation (activate) = if (adminVerification(i))
71+ then [BooleanEntry("RECOMMENDATION", activate)]
72+ else throw(errorAdmin)
73+
74+
75+
76+@Callable(i)
77+func acceptWaves (activate) = if (adminVerification(i))
6778 then [BooleanEntry(aWaves, activate)]
6879 else throw(errorAdmin)
6980
7081
7182
7283 @Callable(i)
73-func addAdmin (address) = if (if ((i.caller == this))
74- then true
75- else (i.caller == adminVerification()))
84+func addAdmin (address) = if (adminVerification(i))
7685 then [StringEntry(aAD, address)]
7786 else throw(errorAdmin)
7887
7988
8089
8190 @Callable(i)
82-func BlockDistribution (amount) = if (if ((i.caller == this))
83- then true
84- else (i.caller == adminVerification()))
91+func BlockDistribution (amount) = if (adminVerification(i))
8592 then [IntegerEntry(bcD, amount)]
8693 else throw(errorAdmin)
8794
8895
8996
9097 @Callable(i)
91-func SetOracle (address,number) = if (if ((i.caller == this))
92- then true
93- else (i.caller == adminVerification()))
98+func SetOracle (address,number) = if (adminVerification(i))
9499 then [StringEntry((oC + toString(number)), address), IntegerEntry(oT, number)]
95100 else throw(errorAdmin)
101+
102+
103+
104+@Callable(i)
105+func Set (address,T) = {
106+ let ki = if ((T == 1))
107+ then (ao + "IDO")
108+ else if ((T == 2))
109+ then (ao + "BRIDGES")
110+ else if ((T == 3))
111+ then (ao + "FARMS")
112+ else if ((T == 4))
113+ then (ao + "POOLS")
114+ else (ao + "NFT")
115+ if (adminVerification(i))
116+ then [StringEntry(ki, address)]
117+ else throw(errorAdmin)
118+ }
96119
97120

github/deemru/w8io/169f3d6 
58.05 ms