tx · GFm8dhSqPDmXZrjhmtZmfgfxPaf8MpQMMRFFjdYtj6RS

3MvyzDtzWWV5MZ1GP8JfQhhQqiGU4Nbifdy:  -0.00500000 Waves

2022.06.21 12:33 [2105978] smart account 3MvyzDtzWWV5MZ1GP8JfQhhQqiGU4Nbifdy > SELF 0.00000000 Waves

{ "type": 13, "id": "GFm8dhSqPDmXZrjhmtZmfgfxPaf8MpQMMRFFjdYtj6RS", "fee": 500000, "feeAssetId": null, "timestamp": 1655804034060, "version": 2, "chainId": 84, "sender": "3MvyzDtzWWV5MZ1GP8JfQhhQqiGU4Nbifdy", "senderPublicKey": "3o2zJzkX9SQ65BrfAiyV4tuKneQz8eDLocKmiai1L6Tg", "proofs": [ "4WDSH47r3uCnx5HymukQSwpvnqYdt5KYTQant4cHZ4ioqKSrBFpmraB9FpJ7VSRG3FdPakNDKUq8rb9yQWC89vN2" ], "script": "base64:AAIFAAAAAAAAABkIAhIDCgEBEgQKAggBEgQKAggBEgQKAggIAAAAGAAAAAAKc2hpbnl3Z2dpZAEAAAAgiWnPAv+2urnUcZbXebiZdiawdNB3efRzbobw9HOfBiYAAAAAD3RyZWFzdXJ5QWRkcmVzcwEAAAAaAVRl+PAWCwTAWUJwGp5IjJf/ftwcYvLdu/0AAAAADWFzc2V0c0FkZHJlc3MBAAAAGgFUy+a0wXfXHSctaxYQS8qRSOspiwoalaeaAAAAABJtYXJrZXRwbGFjZUFkZHJlc3MBAAAAGgFUHSG5k/H8GMOnG0lxFkOWUXTrrFQuJbzvAAAAABRjb25maWd1cmF0aW9uQWRkcmVzcwEAAAAaAVTbIMuXkVY/Qg5sp2U1gothv7V0cji00C4AAAAADm5hdGlvbnNBZGRyZXNzAQAAABoBVE2F6N70+ERrWRA7cF/Dt7llDlH1REZtoAAAAAALYWRtaW5XYWxsZXQJAQAAABFAZXh0ck5hdGl2ZSgxMDYyKQAAAAECAAAAIzNNcE50aVBTUlNxNk5uYVFZazM4QmZXU3paY2dBWVR5clE5AAAAABZk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AAAAIFAAAACU5hdGlvbmtleQUAAAAIbmF0aW9uSWQJAARMAAAAAgkBAAAAC1N0cmluZ0VudHJ5AAAAAgkAAaQAAAABBQAAAAhuYXRpb25JZAUAAAAJTmF0aW9ua2V5BQAAAANuaWwJAAACAAAAAQIAAAAkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuCQAAAgAAAAECAAAAJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgAAAAFpAQAAABhzZXRUZWNuaG5vbG9neURpc2NvdmVyZWQAAAACAAAACW5hdGlvbktleQAAAA10ZWNobm9sb2d5S2V5AwkBAAAAASEAAAABCQEAAAAKY2hlY2tBZG1pbgAAAAEIBQAAAAFpAAAABmNhbGxlcgkAAAIAAAABAgAAAClPbmx5IHRoZSBhZG1pbiBjYW4gcGVyZm9ybSB0aGlzIG9wZXJhdGlvbgQAAAAJTmF0aW9ua2V5CQABLAAAAAIJAAEsAAAAAgUAAAAJbmF0aW9uS2V5AgAAAAFfBQAAAA10ZWNobm9sb2d5S2V5CQAFFAAAAAIJAARMAAAAAgkBAAAADEJvb2xlYW5FbnRyeQAAAAIFAAAACU5hdGlvbmtleQYFAAAAA25pbAYAAAAAVtsO4A==", "height": 2105978, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 5dPt5PkF8BwD815Q9mCuvpTw9dBy3UWm8omE7izpjrvL Next: AGhvEhDz9ZaTGddeeMchzptHK1TvQy3edUUJWbhX7Y9B Diff:
OldNewDifferences
1919
2020 let dailyStakingRewardsWallet = addressFromStringValue("3Mv3mr3uNXdpgkVPApbGEJjMQXqau37DY5i")
2121
22-func checkAdmin (caller) = if (if (if (if ((caller == adminWallet))
22+func checkAdmin (caller) = if (if (if (if (if ((caller == adminWallet))
2323 then true
2424 else (caller == this))
2525 then true
2727 then true
2828 else (caller.bytes == treasuryAddress))
2929 then true
30- else (caller.bytes == marketplaceAddress)
30+ else (caller.bytes == marketplaceAddress))
31+ then true
32+ else (caller.bytes == nationsAddress)
3133
3234
3335 func tryGetInteger (key) = match getInteger(this, key) {
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let shinywggid = base58'AFQS5E4ELtxex3iANtWtUU2V2oWJZSo8VVnK8z3VFmqf'
55
66 let treasuryAddress = base58'3MyDGEoKp1gF4LSRknk9vSuDEyrwuYXcQEQ'
77
88 let assetsAddress = base58'3N8WDKbqGox5Eky326PHHT7rUyrby5MXdmb'
99
1010 let marketplaceAddress = base58'3Mra7mjPipcQd5sJaRmXK8xgS4scb8gPF4A'
1111
1212 let configurationAddress = base58'3N9tj3b2djcaZozn97VkYchL9S1i6cdEbC1'
1313
1414 let nationsAddress = base58'3MvyzDtzWWV5MZ1GP8JfQhhQqiGU4Nbifdy'
1515
1616 let adminWallet = addressFromStringValue("3MpNtiPSRSq6NnaQYk38BfWSzZcgAYTyrQ9")
1717
1818 let dailyGameRewardsWallet = addressFromStringValue("3MuSrXTTiwo9bdoD6FeaBpMUYMiU5saDv2U")
1919
2020 let dailyStakingRewardsWallet = addressFromStringValue("3Mv3mr3uNXdpgkVPApbGEJjMQXqau37DY5i")
2121
22-func checkAdmin (caller) = if (if (if (if ((caller == adminWallet))
22+func checkAdmin (caller) = if (if (if (if (if ((caller == adminWallet))
2323 then true
2424 else (caller == this))
2525 then true
2626 else (caller.bytes == assetsAddress))
2727 then true
2828 else (caller.bytes == treasuryAddress))
2929 then true
30- else (caller.bytes == marketplaceAddress)
30+ else (caller.bytes == marketplaceAddress))
31+ then true
32+ else (caller.bytes == nationsAddress)
3133
3234
3335 func tryGetInteger (key) = match getInteger(this, key) {
3436 case b: Int =>
3537 b
3638 case _ =>
3739 0
3840 }
3941
4042
4143 func tryGetBoolean (key) = match getBoolean(this, key) {
4244 case b: Boolean =>
4345 b
4446 case _ =>
4547 false
4648 }
4749
4850
4951 func tryGetString (key) = match getString(this, key) {
5052 case b: String =>
5153 b
5254 case _ =>
5355 ""
5456 }
5557
5658
5759 func getALKey (Name,Level) = ((Name + "_lvl") + toString(Level))
5860
5961
6062 func confTryGetInteger (key) = match getInteger(Address(configurationAddress), key) {
6163 case b: Int =>
6264 b
6365 case _ =>
6466 0
6567 }
6668
6769
6870 func confTryGetString (key) = match getString(Address(configurationAddress), key) {
6971 case b: String =>
7072 b
7173 case _ =>
7274 ""
7375 }
7476
7577
7678 func confTryGetBoolean (key) = match getBoolean(Address(configurationAddress), key) {
7779 case b: Boolean =>
7880 b
7981 case _ =>
8082 false
8183 }
8284
8385
8486 func getTreasuryKey (nationid) = (nationid + "_Treasury")
8587
8688
8789 func treasuryTryGetInteger (key) = match getInteger(Address(treasuryAddress), key) {
8890 case b: Int =>
8991 b
9092 case _ =>
9193 0
9294 }
9395
9496
9597 func nationsTryGetInteger (key) = match getInteger(Address(nationsAddress), key) {
9698 case b: Int =>
9799 b
98100 case _ =>
99101 0
100102 }
101103
102104
103105 func nationsTryGetBoolean (key) = match getBoolean(Address(nationsAddress), key) {
104106 case b: Boolean =>
105107 b
106108 case _ =>
107109 false
108110 }
109111
110112
111113 func nationsTryGetString (key) = match getString(Address(nationsAddress), key) {
112114 case b: String =>
113115 b
114116 case _ =>
115117 ""
116118 }
117119
118120
119121 func getAssetOwnerKeyString (assetId) = (assetId + "_Owner")
120122
121123
122124 let startNationsSHEG = 90000000000
123125
124126 @Callable(i)
125127 func setUserNation (nationId) = [IntegerEntry(toString(i.caller), nationId)]
126128
127129
128130
129131 @Callable(i)
130132 func setUserPower (address,newPower) = if (!(checkAdmin(i.caller)))
131133 then throw("Only the admin can perform this operation")
132134 else $Tuple2([IntegerEntry((address + "_Power"), newPower)], newPower)
133135
134136
135137
136138 @Callable(i)
137139 func setNationDiscovered (strOwner,nationId) = if (!(checkAdmin(i.caller)))
138140 then throw("Only the admin can perform this operation")
139141 else {
140142 let Nationkey = ("Nation_" + toBase58String(i.transactionId))
141143 let deposit = invoke(Address(treasuryAddress), "increaseNationWallet", [Nationkey, startNationsSHEG], i.payments)
142144 if ((deposit == deposit))
143145 then {
144146 let own = invoke(Address(assetsAddress), "setNationOwner", [Nationkey, strOwner], nil)
145147 if ((own == own))
146148 then [IntegerEntry(Nationkey, nationId), StringEntry(toString(nationId), Nationkey)]
147149 else throw("Strict value is not equal to itself.")
148150 }
149151 else throw("Strict value is not equal to itself.")
150152 }
151153
152154
153155
154156 @Callable(i)
155157 func setTecnhnologyDiscovered (nationKey,technologyKey) = if (!(checkAdmin(i.caller)))
156158 then throw("Only the admin can perform this operation")
157159 else {
158160 let Nationkey = ((nationKey + "_") + technologyKey)
159161 $Tuple2([BooleanEntry(Nationkey, true)], true)
160162 }
161163
162164

github/deemru/w8io/026f985 
30.03 ms