tx · fjM7qt9tfLoajfYJBzDKRimZRsEEdtmshVnhCrQcFPy

3MumkGGztCKAXpWDqxkddofqXSUbqQkvSJy:  -0.01000000 Waves

2023.01.17 03:47 [2408232] smart account 3MumkGGztCKAXpWDqxkddofqXSUbqQkvSJy > SELF 0.00000000 Waves

{ "type": 13, "id": "fjM7qt9tfLoajfYJBzDKRimZRsEEdtmshVnhCrQcFPy", "fee": 1000000, "feeAssetId": null, "timestamp": 1673916544443, "version": 2, "chainId": 84, "sender": "3MumkGGztCKAXpWDqxkddofqXSUbqQkvSJy", "senderPublicKey": "C3PaRKeL8AUKbwUqdniMQtThgcTh5DYHV1777Hkxy7rp", "proofs": [ "btkHyXmUL3STts5chWPt6wkSkDR7owwNkUvU9AHcRSK3oxvEuJWCpJoXND9rJQJfnt8citvWVSRu352NNjA3Kcz" ], "script": "base64:BgINCAISAwoBCBIECgIICA4ABWNoYWluCQCwCQEJAMkBAgkAygECCAUEdGhpcwVieXRlcwABAAEAC3VzZG5Bc3NldElkBAckbWF0Y2gwBQVjaGFpbgMJAAACAgFXBQckbWF0Y2gwASC2JinDBPXOU5GkDkt1JC9kjFGx+t+vVCm9SNIdKrKq0QMJAAACAgFUBQckbWF0Y2gwASD3dur394PKZdtuE+4CO89YKZWpwdGN8kvabNgdYoDI3gkAAgECDVVua25vd24gY2hhaW4AD2Vjb25vbXlDb250cmFjdAkBEUBleHRyTmF0aXZlKDEwNjIpAQQHJG1hdGNoMAUFY2hhaW4DCQAAAgIBVwUHJG1hdGNoMAIjM1Ayc2sxS25jU3hSYVpzOGI0Q1dHUHcyamt2dmF2NzR1NEQDCQAAAgIBVAUHJG1hdGNoMAIjM044eTR3eFgzSkM0VGRyQ0pCWFgxNlNqV2Y2WDI1NmhyZXAJAAIBAg1Vbmtub3duIGNoYWluAA9zdGFraW5nQ29udHJhY3QJARFAZXh0ck5hdGl2ZSgxMDYyKQEEByRtYXRjaDAFBWNoYWluAwkAAAICAVcFByRtYXRjaDACIzNQTG5jWH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jdAkBD2tleUR1Y2tMb2NhdGlvbgEFC2R1Y2tBc3NldElkAgAEBmhlYWx0aAkBC3ZhbHVlT3JFbHNlAgkAmggCBQ9zdGFraW5nQ29udHJhY3QJAQ1rZXlEdWNrSGVhbHRoAQULZHVja0Fzc2V0SWQA////////////AQQIYmFja3BhY2sJAQt2YWx1ZU9yRWxzZQIJAJ0IAgUPc3Rha2luZ0NvbnRyYWN0CQERa2V5QmFja3BhY2tCeUR1Y2sBBQtkdWNrQXNzZXRJZAIaMDowXzBfMF8wXzBfMDowXzBfMF8wXzBfMDoECGJhbGFuY2VzCQEOd2FsbGV0SW50ZXJuYWwBBQ51c2VyQWRkcmVzc09wdAkAlAoCBQNuaWwJAMwIAgkArAICAhIlcyVkX19zdGFrZWRUaW1lX18JAKQDAQUKc3Rha2VkVGltZQkAzAgCCQCsAgICDSVzJXNfX293bmVyX18FBW93bmVyCQDMCAIJAKwCAgIMJXMlc19fbmFtZV9fBQRuYW1lCQDMCAIJAKwCAgIQJXMlc19fbG9jYXRpb25fXwULY3VyTG9jYXRpb24JAMwIAgkArAICAg4lcyVkX19oZWFsdGhfXwkApAMBBQZoZWFsdGgJAMwIAgkArAICAhAlcyVzX19iYWNrUGFja19fBQhiYWNrcGFjawkAzAgCCQCsAgIJAKwCAgkArAICAhAlcyVkJWRfX3dhbGxldF9fCQCkAwEJAJEDAgUIYmFsYW5jZXMAAAIBXwkApAMBCQCRAwIFCGJhbGFuY2VzAAEFA25pbABTy3L7", "height": 2408232, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: KxeNzrMhp4EsChMTVU7HAWStTu45vwiDoBBMLACbQGh Next: 8HMZYJMs9UXbDHsgvNRp6HwckFteiC9jLyBofqXirWQy Diff:
OldNewDifferences
7070 @Callable(i)
7171 func walletInfoREADONLY (userAddressOpt) = {
7272 let balances = walletInternal(userAddressOpt)
73- $Tuple2(nil, makeString(["%s%d%d__wallet", toString(balances[0]), toString(balances[1])], "__"))
73+ $Tuple2(nil, ((("%s%d%d__wallet__" + toString(balances[0])) + "_") + toString(balances[1])))
7474 }
7575
7676
9696 let health = valueOrElse(getInteger(stakingContract, keyDuckHealth(duckAssetId)), -1)
9797 let backpack = valueOrElse(getString(stakingContract, keyBackpackByDuck(duckAssetId)), "0:0_0_0_0_0_0:0_0_0_0_0_0:")
9898 let balances = walletInternal(userAddressOpt)
99- $Tuple2(nil, [("%s%d__stakedTime__" + toString(stakedTime)), ("%s%s__owner__" + owner), ("%s%s__name__" + name), ("%s%s__location__" + curLocation), ("%s%d__health__" + toString(health)), ("%s%s__backPack__" + backpack), makeString(["%s%d%d__wallet", toString(balances[0]), toString(balances[1])], "__")])
99+ $Tuple2(nil, [("%s%d__stakedTime__" + toString(stakedTime)), ("%s%s__owner__" + owner), ("%s%s__name__" + name), ("%s%s__location__" + curLocation), ("%s%d__health__" + toString(health)), ("%s%s__backPack__" + backpack), ((("%s%d%d__wallet__" + toString(balances[0])) + "_") + toString(balances[1]))])
100100 }
101101 }
102102
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let chain = toUtf8String(take(drop(this.bytes, 1), 1))
55
66 let usdnAssetId = match chain {
77 case _ =>
88 if (("W" == $match0))
99 then base58'DG2xFkPdDwKUoBkzGAhQtLpSGzfXLiCYPEzeKH2Ad24p'
1010 else if (("T" == $match0))
1111 then base58'HezsdQuRDtzksAYUy97gfhKy7Z1NW2uXYSHA3bgqenNZ'
1212 else throw("Unknown chain")
1313 }
1414
1515 let economyContract = addressFromStringValue(match chain {
1616 case _ =>
1717 if (("W" == $match0))
1818 then "3P2sk1KncSxRaZs8b4CWGPw2jkvvav74u4D"
1919 else if (("T" == $match0))
2020 then "3N8y4wxX3JC4TdrCJBXX16SjWf6X256hrep"
2121 else throw("Unknown chain")
2222 })
2323
2424 let stakingContract = addressFromStringValue(match chain {
2525 case _ =>
2626 if (("W" == $match0))
2727 then "3PLncXtS1U83D6cQbFD3H8rBHPLgzxSFKZ1"
2828 else if (("T" == $match0))
2929 then "3NDCyBG5q85JuaRiigUeEtainyjCQT3XpZm"
3030 else throw("Unknown chain")
3131 })
3232
3333 let LANDPREFIX = "LAND"
3434
3535 let DUCKPREFIX = "DUCK"
3636
3737 func keyDuckIdToOwner (assetId) = ("duckOwner_" + assetId)
3838
3939
4040 func keyStakedTimeByAssetId (assetId) = ("stakedTime_" + assetId)
4141
4242
4343 func keyStakedDuckByOwner (ownerAddr) = ("stakedDuckByOwner_" + ownerAddr)
4444
4545
4646 func keyStakedTimeByTypeAssetIdAndOwner (nftType,assetId,ownerAddr) = ((((("stakedTimeByTypeAssetIdAndOwner_" + nftType) + "_") + assetId) + "_") + ownerAddr)
4747
4848
4949 func keyBackpackByDuck (duckAssetId) = ("backPack_" + duckAssetId)
5050
5151
5252 func keyDuckLocation (duckAssetId) = ("duckLocation_" + duckAssetId)
5353
5454
5555 func keyDuckHealth (duckAssetId) = ("duckHealth_" + duckAssetId)
5656
5757
5858 func walletInternal (userAddressOpt) = {
5959 let addr = addressFromString(userAddressOpt)
6060 let balance = if (isDefined(addr))
6161 then wavesBalance(value(addr))
6262 else BalanceDetails(0, 0, 0, 0)
6363 let usdnBalance = if (isDefined(addr))
6464 then assetBalance(value(addr), usdnAssetId)
6565 else 0
6666 [balance.available, usdnBalance]
6767 }
6868
6969
7070 @Callable(i)
7171 func walletInfoREADONLY (userAddressOpt) = {
7272 let balances = walletInternal(userAddressOpt)
73- $Tuple2(nil, makeString(["%s%d%d__wallet", toString(balances[0]), toString(balances[1])], "__"))
73+ $Tuple2(nil, ((("%s%d%d__wallet__" + toString(balances[0])) + "_") + toString(balances[1])))
7474 }
7575
7676
7777
7878 @Callable(i)
7979 func duckInfoREADONLY (duckAssetId,userAddressOpt) = {
8080 let addr = addressFromString(userAddressOpt)
8181 let duckAsset = fromBase58String(duckAssetId)
8282 if ((duckAssetId == ""))
8383 then throw("duckAssetId is required")
8484 else {
8585 let stakedTime = valueOrElse(getInteger(stakingContract, keyStakedTimeByAssetId(duckAssetId)), 0)
8686 let owner = if ((stakedTime > 0))
8787 then value(getString(stakingContract, keyDuckIdToOwner(duckAssetId)))
8888 else if (if (isDefined(addr))
8989 then (assetBalance(value(addr), duckAsset) == 1)
9090 else false)
9191 then userAddressOpt
9292 else throw("unknown owner")
9393 let asset = value(assetInfo(duckAsset))
9494 let name = asset.name
9595 let curLocation = valueOrElse(getString(stakingContract, keyDuckLocation(duckAssetId)), "")
9696 let health = valueOrElse(getInteger(stakingContract, keyDuckHealth(duckAssetId)), -1)
9797 let backpack = valueOrElse(getString(stakingContract, keyBackpackByDuck(duckAssetId)), "0:0_0_0_0_0_0:0_0_0_0_0_0:")
9898 let balances = walletInternal(userAddressOpt)
99- $Tuple2(nil, [("%s%d__stakedTime__" + toString(stakedTime)), ("%s%s__owner__" + owner), ("%s%s__name__" + name), ("%s%s__location__" + curLocation), ("%s%d__health__" + toString(health)), ("%s%s__backPack__" + backpack), makeString(["%s%d%d__wallet", toString(balances[0]), toString(balances[1])], "__")])
99+ $Tuple2(nil, [("%s%d__stakedTime__" + toString(stakedTime)), ("%s%s__owner__" + owner), ("%s%s__name__" + name), ("%s%s__location__" + curLocation), ("%s%d__health__" + toString(health)), ("%s%s__backPack__" + backpack), ((("%s%d%d__wallet__" + toString(balances[0])) + "_") + toString(balances[1]))])
100100 }
101101 }
102102
103103

github/deemru/w8io/026f985 
35.06 ms