tx · 6oKHoYqen3jz29SpjWYHWYtrn3aQcty9Yc9e5kERP2Qv

3MyDGEoKp1gF4LSRknk9vSuDEyrwuYXcQEQ:  -0.01000000 Waves

2022.05.10 16:17 [2045618] smart account 3MyDGEoKp1gF4LSRknk9vSuDEyrwuYXcQEQ > SELF 0.00000000 Waves

{ "type": 13, "id": "6oKHoYqen3jz29SpjWYHWYtrn3aQcty9Yc9e5kERP2Qv", "fee": 1000000, "feeAssetId": null, "timestamp": 1652188685493, "version": 2, "chainId": 84, "sender": "3MyDGEoKp1gF4LSRknk9vSuDEyrwuYXcQEQ", "senderPublicKey": "BhRnrwd6wVHSkSaWXCjQRjaoXcpCdUW2hkJD6V7uVDxN", "proofs": [ "5A835Z2DTHJmc7k77JyYJcjG3fJayyWN9mqPkzzu8tWmdDA32SQs3qGYFBBCqFNjBB8kUr729jegBSaEUEYEzaaB" ], "script": "base64:AAIFAAAAAAAAACkIAhIAEgQKAggBEgMKAQESBQoDCAgBEgQKAggBEgQKAggBEgASAwoBGAAAAAsAAAAACnNoaW55d2dnaWQBAAAAIIlpzwL/trq51HGW13m4mXYmsHTQd3n0c26G8PRznwYmAAAAAAxhZG1pbkFkZHJlc3MJAQAAABFAZXh0ck5hdGl2ZSgxMDYyKQAAAAECAAAAIzNNcE50aVBTUlNxNk5uYVFZazM4QmZXU3paY2dBWVR5clE5AAAAAA1hc3NldHNBZGRyZXNzAQAAABoBVMvmtMF31x0nLWsWEEvKkUjrKYsKGpWnmgAAAAAObmF0aW9uc0FkZHJlc3MBAAAAGgFUTYXo3vT4RGtZEDtwX8O3uWUOUfVERm2gAQAAAA10cnlHZXRJbnRlZ2VyAAAAAQAAAANrZXkEAAAAByRtYXRjaDAJAAQaAAAAAgUAAAAEdGhpcwUAAAADa2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAANJbnQEAAAAAWIFAAAAByRtYXRjaDAFAAAAAWIAAAAAAAAAAAABAAAADXRyeUdldEJvb2xlYW4AAAABAAAAA2tle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AAAAAAACcAAAAAAAAAACgAAAAAAAAAACkAAAAAAAAAACoAAAAAAAAAACsAAAAAAAAAACwAAAAAAAAAAC0AAAAAAAAAAC4AAAAAAAAAAC8AAAAAAAAAADAAAAAAAAAAADEAAAAAAAAAADIAAAAAAAAAADMAAAAAAAAAADQAAAAAAAAAADUAAAAAAAAAADYAAAAAAAAAADcAAAAAAAAAADgAAAAAAAAAADkAAAAAAAAAADoAAAAAAAAAADsAAAAAAAAAADwAAAAAkzKxLw==", "height": 2045618, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 4nSvSdNHP1iq16ho7WSHcQvPrGV2jrwdBzxyHBjyefn7 Next: 3K92hmf8Uj3vdqpZ3seYndg43tegzPuGkPjprZbJiPJR Diff:
OldNewDifferences
66 let adminAddress = addressFromStringValue("3MpNtiPSRSq6NnaQYk38BfWSzZcgAYTyrQ9")
77
88 let assetsAddress = base58'3N8WDKbqGox5Eky326PHHT7rUyrby5MXdmb'
9+
10+let nationsAddress = base58'3MvyzDtzWWV5MZ1GP8JfQhhQqiGU4Nbifdy'
911
1012 func tryGetInteger (key) = match getInteger(this, key) {
1113 case b: Int =>
117119
118120
119121 @Callable(i)
120-func arbitraryAddCoins (toAddress,amount) = if (if ((i.caller != adminAddress))
122+func arbitraryAddCoins (toAddress,amount) = if (if (if ((i.caller != adminAddress))
121123 then (i.caller.bytes != assetsAddress)
124+ else false)
125+ then (i.caller.bytes != nationsAddress)
122126 else false)
123127 then throw("you are not authorized to perform this operation")
124128 else internalDeposit(toAddress, amount)
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let shinywggid = base58'AFQS5E4ELtxex3iANtWtUU2V2oWJZSo8VVnK8z3VFmqf'
55
66 let adminAddress = addressFromStringValue("3MpNtiPSRSq6NnaQYk38BfWSzZcgAYTyrQ9")
77
88 let assetsAddress = base58'3N8WDKbqGox5Eky326PHHT7rUyrby5MXdmb'
9+
10+let nationsAddress = base58'3MvyzDtzWWV5MZ1GP8JfQhhQqiGU4Nbifdy'
911
1012 func tryGetInteger (key) = match getInteger(this, key) {
1113 case b: Int =>
1214 b
1315 case _ =>
1416 0
1517 }
1618
1719
1820 func tryGetBoolean (key) = match getBoolean(this, key) {
1921 case b: Boolean =>
2022 b
2123 case _ =>
2224 false
2325 }
2426
2527
2628 func internalDeposit (addressStr,amountIn) = {
2729 let amount = tryGetInteger((addressStr + "_Deposit"))
2830 [IntegerEntry((addressStr + "_Deposit"), (amount + amountIn))]
2931 }
3032
3133
3234 func internalPay (addressStr,amount) = {
3335 let deposited = tryGetInteger((addressStr + "_Deposit"))
3436 if ((0 > (deposited - amount)))
3537 then throw("Not enough deposit.")
3638 else if (((deposited - amount) == 0))
3739 then [DeleteEntry((addressStr + "_Deposit"))]
3840 else [IntegerEntry((addressStr + "_Deposit"), (deposited - amount))]
3941 }
4042
4143
4244 func internalReserve (addressStr,amount) = {
4345 let reservedAmount = tryGetInteger((addressStr + "_Reserved"))
4446 [IntegerEntry((addressStr + "_Reserved"), (reservedAmount + amount))]
4547 }
4648
4749
4850 func internalTransfer (fromAddress,toAddress,amount) = (internalPay(fromAddress, amount) ++ internalDeposit(toAddress, amount))
4951
5052
5153 func addRewardEntry (accum,nextValue) = {
5254 let L = split(nextValue, "_")
5355 let addressStr = L[0]
5456 let amount = parseIntValue(L[1])
5557 let reservedAmount = tryGetInteger((addressStr + "_Reserved"))
5658 (accum :+ IntegerEntry((addressStr + "_Reserved"), (reservedAmount + amount)))
5759 }
5860
5961
6062 @Callable(i)
6163 func Deposit () = {
6264 let addressStr = toString(i.originCaller)
6365 let pmt = i.payments[0]
6466 if ((pmt == pmt))
6567 then {
6668 let amountIn = value(i.payments[0].amount)
6769 if ((amountIn == amountIn))
6870 then {
6971 let assetIn = pmt.assetId
7072 if ((assetIn == assetIn))
7173 then if ((assetIn != shinywggid))
7274 then throw("Only $HEG payments allowed")
7375 else {
7476 let amount = tryGetInteger((addressStr + "_Deposit"))
7577 $Tuple2(internalDeposit(addressStr, (amount + amountIn)), (amount + amountIn))
7678 }
7779 else throw("Strict value is not equal to itself.")
7880 }
7981 else throw("Strict value is not equal to itself.")
8082 }
8183 else throw("Strict value is not equal to itself.")
8284 }
8385
8486
8587
8688 @Callable(i)
8789 func Pay (addressStr,amount) = if (if (if ((i.caller != this))
8890 then (i.caller != adminAddress)
8991 else false)
9092 then (i.caller.bytes != assetsAddress)
9193 else false)
9294 then throw("you are not authorized to perform this operation")
9395 else $Tuple2(internalPay(addressStr, amount), amount)
9496
9597
9698
9799 @Callable(i)
98100 func CallerPay (amount) = {
99101 let callerAddr = toString(i.caller)
100102 internalPay(callerAddr, amount)
101103 }
102104
103105
104106
105107 @Callable(i)
106108 func transferCoins (fromAddress,toAddress,amount) = if (if ((i.caller != adminAddress))
107109 then (i.caller.bytes != assetsAddress)
108110 else false)
109111 then throw("you are not authorized to perform this operation")
110112 else internalTransfer(fromAddress, toAddress, amount)
111113
112114
113115
114116 @Callable(i)
115117 func callerTransferCoins (toAddress,amount) = internalTransfer(toString(i.caller), toAddress, amount)
116118
117119
118120
119121 @Callable(i)
120-func arbitraryAddCoins (toAddress,amount) = if (if ((i.caller != adminAddress))
122+func arbitraryAddCoins (toAddress,amount) = if (if (if ((i.caller != adminAddress))
121123 then (i.caller.bytes != assetsAddress)
124+ else false)
125+ then (i.caller.bytes != nationsAddress)
122126 else false)
123127 then throw("you are not authorized to perform this operation")
124128 else internalDeposit(toAddress, amount)
125129
126130
127131
128132 @Callable(i)
129133 func Redeem () = {
130134 let addressStr = toString(i.caller)
131135 let reservedAmount = tryGetInteger((addressStr + "_Reserved"))
132136 if ((reservedAmount == 0))
133137 then throw("Nothing to redeem")
134138 else [DeleteEntry((addressStr + "_Reserved")), ScriptTransfer(i.caller, reservedAmount, shinywggid)]
135139 }
136140
137141
138142
139143 @Callable(i)
140144 func setRewards (rewards) = if (if ((i.caller != adminAddress))
141145 then (i.caller.bytes != assetsAddress)
142146 else false)
143147 then throw("you are not authorized to perform this operation")
144148 else {
145149 let it = size(rewards)
146150 if ((it > 60))
147151 then throw("you can write max 60 records per call")
148152 else {
149153 let $l = rewards
150154 let $s = size($l)
151155 let $acc0 = nil
152156 func $f0_1 ($a,$i) = if (($i >= $s))
153157 then $a
154158 else addRewardEntry($a, $l[$i])
155159
156160 func $f0_2 ($a,$i) = if (($i >= $s))
157161 then $a
158162 else throw("List size exceeds 60")
159163
160164 $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($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)
161165 }
162166 }
163167
164168

github/deemru/w8io/169f3d6 
45.01 ms