tx · GhTKvW4kjgvmc79URq2qU5mkaddWjT3aafYZF4piqkmY

3N8WDKbqGox5Eky326PHHT7rUyrby5MXdmb:  -0.01000000 Waves

2022.05.10 16:30 [2045631] smart account 3N8WDKbqGox5Eky326PHHT7rUyrby5MXdmb > SELF 0.00000000 Waves

{ "type": 13, "id": "GhTKvW4kjgvmc79URq2qU5mkaddWjT3aafYZF4piqkmY", "fee": 1000000, "feeAssetId": null, "timestamp": 1652189435960, "version": 2, "chainId": 84, "sender": "3N8WDKbqGox5Eky326PHHT7rUyrby5MXdmb", "senderPublicKey": "FWSsBbeCwLVkekWhvNKtX6JkrZiruRybKKVuiS3F4bqN", "proofs": [ "pMEcxtP6cQNUt68m1tbhzovi4wmUc4r1DHu6sDuW3v8Lrm4WgQrCnmYPuojUfD84Vh6eA65FEMpPGbPUzXNqxc8" ], "script": "base64:AAIFAAAAAAAAACEIAhIDCgEIEgQKAggIEgUKAwgICBIFCgMICAgSBAoCCAgAAAASAAAAAApzaGlueXdnZ2lkAQAAACCJac8C/7a6udRxltd5uJl2JrB00Hd59HNuhvD0c58GJgAAAAAPdHJlYXN1cnlBZGRyZXNzAQAAABoBVGX48BYLBMBZQnAankiMl/9+3Bxi8t27/QAAAAAObmF0aW9uc0FkZHJlc3MBAAAAGgFUTYXo3vT4RGtZEDtwX8O3uWUOUfVERm2gAAAAAAxhZG1pbkFkZHJlc3MJAQAAABFAZXh0ck5hdGl2ZSgxMDYyKQAAAAECAAAAIzNNcE50aVBTUlNxNk5uYVFZazM4QmZXU3paY2dBWVR5clE5AAAAAAxCdWlsZFN0YXJ0ZWQCAAAADUJVSUxEX1NUQVJURUQAAAAADUJ1aWxkRmluaXNoZWQCAAAADkJVSUxEX0ZJTklTSEVEAAAAAAZBc3NldHMJAARMAAAAAgIAAAAGTmF0aW9uCQAETAAAAAICAAAABENpdHkJAARMAAAAAgIAAAAHQmFycmFjawkABEwAAAACAgAAAARCYXJuCQAETAAAAAICAAAAB1dhcnJpb3IJAARMAA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U3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuCQAAAgAAAAECAAAAJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgAAAAFpAQAAAA5zZXROYXRpb25Pd25lcgAAAAIAAAAJbmF0aW9uS2V5AAAACG5ld093bmVyAwMJAQAAAAIhPQAAAAIIBQAAAAFpAAAABmNhbGxlcgUAAAAMYWRtaW5BZGRyZXNzBgkBAAAAAiE9AAAAAggIBQAAAAFpAAAABmNhbGxlcgAAAAVieXRlcwUAAAAObmF0aW9uc0FkZHJlc3MJAAUUAAAAAgkABEwAAAACCQEAAAALU3RyaW5nRW50cnkAAAACCQABLAAAAAIFAAAACW5hdGlvbktleQIAAAAGX093bmVyBQAAAAhuZXdPd25lcgUAAAADbmlsBgQAAAAMY3VycmVudE93bmVyCQEAAAAMdHJ5R2V0U3RyaW5nAAAAAQkAASwAAAACBQAAAAluYXRpb25LZXkCAAAABl9Pd25lcgMJAQAAAAIhPQAAAAIFAAAADGN1cnJlbnRPd25lcgkABCUAAAABCAUAAAABaQAAAAZjYWxsZXIJAAACAAAAAQIAAAAcWW91IGFyZSBub3QgdGhlIG5hdGlvbiBvd25lcgkABEwAAAACCQEAAAALU3RyaW5nRW50cnkAAAACCQABLAAAAAIFAAAACW5hdGlvbktleQIAAAAGX093bmVyBQAAAAhuZXdPd25lcgUAAAADbmlsAAAAAH9UHms=", "height": 2045631, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 5AZnZNrPfJHxeUof6RP26roFzCV5hvsCEoBKAuRg86Gh Next: 9Jwxe1iYboFa511bbijPCRCXJT98ABHqrT6oDYs7UeKi Diff:
OldNewDifferences
1313
1414 let BuildFinished = "BUILD_FINISHED"
1515
16-let Assets = ["Nation", "City", "Barrack", "Barn", "Warrior"]
16+let Assets = ["Nation", "City", "Barrack", "Barn", "Warrior", "Settler", "Explorer"]
1717
18-let assetsCost = [0, 1000000000, 1000000000, 1000000000, 500000000]
18+let assetsCost = [0, 1000000000, 1000000000, 1000000000, 500000000, 500000000, 500000000]
1919
20-let assetsDelay = [0, 4, 4, 4, 2]
20+let assetsDelay = [0, 4, 4, 4, 2, 2, 2]
2121
22-let assetsPower = [0, 1000, 500, 500, 0]
22+let assetsPower = [0, 1000, 500, 500, 0, 0, 0]
2323
2424 func treasuryTryGetInteger (key) = match getInteger(Address(treasuryAddress), key) {
2525 case b: Int =>
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 nationsAddress = base58'3MvyzDtzWWV5MZ1GP8JfQhhQqiGU4Nbifdy'
99
1010 let adminAddress = addressFromStringValue("3MpNtiPSRSq6NnaQYk38BfWSzZcgAYTyrQ9")
1111
1212 let BuildStarted = "BUILD_STARTED"
1313
1414 let BuildFinished = "BUILD_FINISHED"
1515
16-let Assets = ["Nation", "City", "Barrack", "Barn", "Warrior"]
16+let Assets = ["Nation", "City", "Barrack", "Barn", "Warrior", "Settler", "Explorer"]
1717
18-let assetsCost = [0, 1000000000, 1000000000, 1000000000, 500000000]
18+let assetsCost = [0, 1000000000, 1000000000, 1000000000, 500000000, 500000000, 500000000]
1919
20-let assetsDelay = [0, 4, 4, 4, 2]
20+let assetsDelay = [0, 4, 4, 4, 2, 2, 2]
2121
22-let assetsPower = [0, 1000, 500, 500, 0]
22+let assetsPower = [0, 1000, 500, 500, 0, 0, 0]
2323
2424 func treasuryTryGetInteger (key) = match getInteger(Address(treasuryAddress), key) {
2525 case b: Int =>
2626 b
2727 case _ =>
2828 0
2929 }
3030
3131
3232 func nationsTryGetInteger (key) = match getInteger(Address(treasuryAddress), key) {
3333 case b: Int =>
3434 b
3535 case _ =>
3636 0
3737 }
3838
3939
4040 func tryGetString (key) = match getString(this, key) {
4141 case b: String =>
4242 b
4343 case _ =>
4444 ""
4545 }
4646
4747
4848 func tryGetInteger (key) = match getInteger(this, key) {
4949 case b: Int =>
5050 b
5151 case _ =>
5252 0
5353 }
5454
5555
5656 func getAssetIdKey (txId,assetType) = ((assetType + "_") + toBase58String(txId))
5757
5858
5959 func getAssetOwnerKey (txId,assetType) = (getAssetIdKey(txId, assetType) + "_Owner")
6060
6161
6262 func getBuildingFinishHeightKey (address,txId,assetType) = (((address + "_") + getAssetIdKey(txId, assetType)) + "_fh")
6363
6464
6565 func getBuildingStatusKey (address,txId,assetType) = (((address + "_") + getAssetIdKey(txId, assetType)) + "_status")
6666
6767
6868 @Callable(i)
6969 func StartBuild (strAssetType) = if (!(containsElement(Assets, strAssetType)))
7070 then throw("This asset is not amanged by the system")
7171 else {
7272 let ind = value(indexOf(Assets, strAssetType))
7373 let delayForBuilding = assetsDelay[ind]
7474 let assetBuildCost = assetsCost[ind]
7575 let amountIn = value(i.payments[0].amount)
7676 if ((assetBuildCost > amountIn))
7777 then throw(("You provided less $heg than the needed cost for building this " + strAssetType))
7878 else if ((i.payments[0].assetId != shinywggid))
7979 then throw("Only $HEG payments allowed")
8080 else {
8181 let pw = invoke(Address(treasuryAddress), "Deposit", nil, i.payments)
8282 match pw {
8383 case r: Int =>
8484 [StringEntry(getBuildingStatusKey(toString(i.originCaller), i.transactionId, strAssetType), BuildStarted), StringEntry(getAssetOwnerKey(i.transactionId, strAssetType), toString(i.originCaller)), IntegerEntry(getBuildingFinishHeightKey(toString(i.originCaller), i.transactionId, strAssetType), (height + delayForBuilding))]
8585 case _ =>
8686 throw("Incorrect invoke result")
8787 }
8888 }
8989 }
9090
9191
9292
9393 @Callable(i)
9494 func FinishBuild (txIdStr,assetStr) = {
9595 let txId = fromBase58String(txIdStr)
9696 let BuildingStatusKey = getBuildingStatusKey(toString(i.caller), txId, assetStr)
9797 let finishHeightKey = getBuildingFinishHeightKey(toString(i.caller), txId, assetStr)
9898 let assetKey = getAssetIdKey(txId, assetStr)
9999 let assetOwner = tryGetString(getAssetOwnerKey(txId, assetStr))
100100 if ((assetOwner != toString(i.caller)))
101101 then throw(("You cannot claim other's players " + assetStr))
102102 else {
103103 let buildingTxStatus = tryGetString(BuildingStatusKey)
104104 if ((buildingTxStatus == ""))
105105 then throw("No pending operations for this asset")
106106 else {
107107 let buildingFinishHeight = getIntegerValue(this, finishHeightKey)
108108 if ((buildingFinishHeight > height))
109109 then throw((((("Building is not finished yet " + toString((buildingFinishHeight - height))) + " blocks remaining, it will take around ") + toString((buildingFinishHeight - height))) + " minutes"))
110110 else {
111111 let idx = value(indexOf(Assets, assetStr))
112112 let assetPower = assetsPower[idx]
113113 let assetCoins = assetsCost[idx]
114114 let refCall = invoke(Address(treasuryAddress), "Pay", [toString(i.caller), assetCoins], nil)
115115 if ((refCall == refCall))
116116 then {
117117 let currentPower = nationsTryGetInteger((toString(i.caller) + "_Power"))
118118 let pw = invoke(Address(nationsAddress), "setUserPower", [toString(i.caller), (currentPower + assetPower)], nil)
119119 if ((pw == pw))
120120 then match pw {
121121 case r: Int =>
122122 [IntegerEntry(assetKey, assetCoins), DeleteEntry(BuildingStatusKey), DeleteEntry(finishHeightKey)]
123123 case _ =>
124124 throw("Incorrect invoke result")
125125 }
126126 else throw("Strict value is not equal to itself.")
127127 }
128128 else throw("Strict value is not equal to itself.")
129129 }
130130 }
131131 }
132132 }
133133
134134
135135
136136 @Callable(i)
137137 func transferOwnership (assetId,newOwner,strAssetType) = if (if (if ((i.caller != adminAddress))
138138 then (i.caller != this)
139139 else false)
140140 then (i.caller.bytes != nationsAddress)
141141 else false)
142142 then throw("Only the admin can perform this operation")
143143 else {
144144 let oldOwner = tryGetString((assetId + "_Owner"))
145145 let currentPower = nationsTryGetInteger((oldOwner + "_Power"))
146146 let assetPower = assetsPower[value(indexOf(Assets, strAssetType))]
147147 let pw = invoke(Address(nationsAddress), "setUserPower", [oldOwner, (currentPower - assetPower)], nil)
148148 if ((pw == pw))
149149 then if ((pw != (currentPower - assetPower)))
150150 then throw("Incorrect invoke result")
151151 else {
152152 let newcurrentPower = nationsTryGetInteger((newOwner + "_Power"))
153153 let pw2 = invoke(Address(nationsAddress), "setUserPower", [newOwner, (newcurrentPower + assetPower)], nil)
154154 if ((pw2 == pw2))
155155 then match pw2 {
156156 case r: Int =>
157157 [StringEntry((assetId + "_Owner"), newOwner)]
158158 case _ =>
159159 throw("Incorrect invoke result")
160160 }
161161 else throw("Strict value is not equal to itself.")
162162 }
163163 else throw("Strict value is not equal to itself.")
164164 }
165165
166166
167167
168168 @Callable(i)
169169 func destroyAssetAndTransfer (assetId,toAddress,strAssetType) = if (if ((i.caller != adminAddress))
170170 then (i.caller != this)
171171 else false)
172172 then throw("Only the admin can perform this operation")
173173 else {
174174 let oldOwner = tryGetString((assetId + "_Owner"))
175175 let assetCoins = tryGetInteger(assetId)
176176 let refCall = invoke(Address(treasuryAddress), "arbitraryAddCoins", [toAddress, assetCoins], nil)
177177 if ((refCall == refCall))
178178 then {
179179 let currentPower = nationsTryGetInteger((oldOwner + "_Power"))
180180 let assetPower = assetsPower[value(indexOf(Assets, strAssetType))]
181181 let pw = invoke(Address(nationsAddress), "setUserPower", [toString(i.caller), (currentPower - assetPower)], nil)
182182 if ((pw == pw))
183183 then match pw {
184184 case r: Int =>
185185 [DeleteEntry(assetId)]
186186 case _ =>
187187 throw("Incorrect invoke result")
188188 }
189189 else throw("Strict value is not equal to itself.")
190190 }
191191 else throw("Strict value is not equal to itself.")
192192 }
193193
194194
195195
196196 @Callable(i)
197197 func setNationOwner (nationKey,newOwner) = if (if ((i.caller != adminAddress))
198198 then true
199199 else (i.caller.bytes != nationsAddress))
200200 then $Tuple2([StringEntry((nationKey + "_Owner"), newOwner)], true)
201201 else {
202202 let currentOwner = tryGetString((nationKey + "_Owner"))
203203 if ((currentOwner != toString(i.caller)))
204204 then throw("You are not the nation owner")
205205 else [StringEntry((nationKey + "_Owner"), newOwner)]
206206 }
207207
208208

github/deemru/w8io/169f3d6 
48.07 ms