tx · Cn4jbpdfoMf4rZ8MCxmeN4ym3gbS74XA2CTzkuFiuRWK

3N7UuYar6264P58FBhVWKPQAh4Yua2hgngv:  -0.00400000 Waves

2024.09.12 19:20 [3280653] smart account 3N7UuYar6264P58FBhVWKPQAh4Yua2hgngv > SELF 0.00000000 Waves

{ "type": 13, "id": "Cn4jbpdfoMf4rZ8MCxmeN4ym3gbS74XA2CTzkuFiuRWK", "fee": 400000, "feeAssetId": null, "timestamp": 1726158029547, "version": 2, "chainId": 84, "sender": "3N7UuYar6264P58FBhVWKPQAh4Yua2hgngv", "senderPublicKey": "2fNSk5gmWbXBDTkSYSKd66xSgVvAYzrJnP9YSAFNvTwC", "proofs": [ "3J55ca9jmEAXc7rHQzg6ndadvQUzAuAxubVhkzijFcPf6pUrwJBQVGLvBqBuRrwjnxoS9KhwVzAhssttzEFAHMtX" ], "script": "base64:BgIMCAISAwoBGBIDCgEIGwADU0VQAgJfXwAFY2hhaW4JAMkBAgkAygECCAUEdGhpcwVieXRlcwABAAEAFmRlZmF1bHRSZXN0MkFkZHJlc3NTdHIEByRtYXRjaDAFBWNoYWluAwkAAAIBAVcFByRtYXRjaDACIzNQRndZdGE4YmlFejMxenBlRmU1REpLOHdFNXRyU3BRVkY4AwkAAAIBAVQFByRtYXRjaDACIzNON1V1WWFyNjI2NFA1OEZCaFZXS1BRQWg0WXVhMmhnbmd2CQACAQINVW5rbm93biBjaGFpbgEPZ2V0U3RyaW5nT3JGYWlsAgdhZGRyZXNzA2tleQkBE3ZhbHVlT3JFcnJvck1lc3NhZ2UCCQCdCAIFB2FkZHJlc3MFA2tleQkAuQkCCQDMCAICCm1hbmRhdG9yeSAJAMwIAgkApQgBBQdhZGRyZXNzCQDMCAICAS4JAMwIAgUDa2V5CQDMCAICDyBpcyBub3QgZGVmaW5lZAUDbmlsAgAAEElkeENmZ0FjcmVzMkRhcHAAAQANSWR4Q2ZnV2xnRGFwcAACAQprZXlSZXN0Q2ZnAAIOJXNfX3Jlc3RDb25ma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AIAAwAEAAUABgAHAAgACQAKCQDMCAIJAQtTdHJpbmdFbnRyeQIJAQprZXlSZXN0Q2ZnAAkAuQkCCQDMCAIFBWRlc2NyBQljb250cmFjdHMFA1NFUAkAzAgCCQELU3RyaW5nRW50cnkCCQEPa2V5UmVzdDJBZGRyZXNzAAkApQgBBQR0aGlzBQNuaWwBaQESd2FsbGV0SW5mb1JFQURPTkxZAQ51c2VyQWRkcmVzc09wdAkAlAoCBQNuaWwJAQ53YWxsZXRJbnRlcm5hbAEFDnVzZXJBZGRyZXNzT3B0ABVQaEY=", "height": 3280653, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 81FfyMfwhifgSh933ZGAbRCsjJ3QEXURjpddssyUtyM4 Next: 8oNhYXVoHCW257sF3FavVcLbTVipu7JgHMGp8fh5SX1F Diff:
OldNewDifferences
33 {-# CONTENT_TYPE DAPP #-}
44 let SEP = "__"
55
6-let MULT8 = 100000000
7-
86 let chain = take(drop(this.bytes, 1), 1)
97
10-let defaultRestAddressStr = match chain {
8+let defaultRest2AddressStr = match chain {
119 case _ =>
1210 if ((base58'2W' == $match0))
13- then "3P..."
11+ then "3PFwYta8biEz31zpeFe5DJK8wE5trSpQVF8"
1412 else if ((base58'2T' == $match0))
15- then "3M..."
13+ then "3N7UuYar6264P58FBhVWKPQAh4Yua2hgngv"
1614 else throw("Unknown chain")
1715 }
1816
1917 func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], ""))
2018
2119
22-let IdxCfgAcresDapp = 1
20+let IdxCfgAcres2Dapp = 1
2321
2422 let IdxCfgWlgDapp = 2
2523
2624 func keyRestCfg () = "%s__restConfig"
2725
2826
29-func keyRestAddress () = "%s__restAddr"
27+func keyRest2Address () = "%s__rest2Addr"
3028
3129
3230 func readRestCfgOrFail (rest) = split_4C(getStringOrFail(rest, keyRestCfg()), SEP)
3331
3432
35-func getContractAddressOrFail (restCfg,idx) = valueOrErrorMessage(addressFromString(restCfg[idx]), ("Rest cfg doesn't contain address at index " + toString(idx)))
33+func getContractAddressOrFail (rest2Cfg,idx) = valueOrErrorMessage(addressFromString(rest2Cfg[idx]), ("Rest cfg doesn't contain address at index " + toString(idx)))
3634
3735
38-let restContract = addressFromStringValue(valueOrElse(getString(this, keyRestAddress()), defaultRestAddressStr))
36+let rest2Contract = addressFromStringValue(valueOrElse(getString(this, keyRest2Address()), defaultRest2AddressStr))
3937
40-let restCfg = readRestCfgOrFail(restContract)
38+let rest2Cfg = readRestCfgOrFail(rest2Contract)
4139
42-let stakingContract = getContractAddressOrFail(restCfg, IdxCfgAcresDapp)
40+let acres2Contract = getContractAddressOrFail(rest2Cfg, IdxCfgAcres2Dapp)
4341
44-let wlgContract = getContractAddressOrFail(restCfg, IdxCfgWlgDapp)
42+let wlgContract = getContractAddressOrFail(rest2Cfg, IdxCfgWlgDapp)
4543
4644 func keyLastTxIdByUser (addr) = ("lastTxIdByUser_" + addr)
4745
5250
5351 let acresAssetIdKey = "acresAssetId"
5452
55-let acresAssetId = valueOrErrorMessage(getBinary(stakingContract, acresAssetIdKey), "ACRES is not issued yet")
53+let acresAssetId = valueOrErrorMessage(getBinary(acres2Contract, acresAssetIdKey), "ACRES is not issued yet")
54+
55+func keyAddressToCustomName (addr) = ("accountCustomNameByAddr_" + addr)
56+
57+
58+func keyAddressRefBy (addr) = ("accRefBy_" + addr)
59+
60+
61+func keyAddressReferrals (addr) = ("accReferrals_" + addr)
62+
63+
64+let M8_ = 100000000
65+
66+func keyAcresStakedAmtByUser (addr) = ("acresStakedAmountByUser_" + addr)
67+
5668
5769 let levels = [10, 20, 40, 80, 150, 250, 400, 700, 1000]
5870
5971 func getLevelByAcres (acres) = {
60- let acr = (acres / MULT8)
72+ let acr = (acres / M8_)
6173 func checker (acc,item) = if ((item > acr))
6274 then acc
6375 else (acc + 1)
8092 }
8193
8294
83-func keyAddressToCustomName (addr) = ("accountCustomNameByAddr_" + addr)
84-
85-
86-func keyAddressRefBy (addr) = ("accRefBy_" + addr)
87-
88-
89-func keyAddressReferrals (addr) = ("accReferrals_" + addr)
90-
91-
92-func keyAcresStakedAmountByUser (addr) = ("acresStakedAmountByUser_" + addr)
93-
94-
9595 func walletInternal (userAddressOpt) = {
9696 let addr = addressFromString(userAddressOpt)
9797 let balance = if (isDefined(addr))
100100 let wlgoldBalance = if (isDefined(addr))
101101 then assetBalance(value(addr), wlgAssetId)
102102 else 0
103- let customName = valueOrElse(getString(stakingContract, keyAddressToCustomName(userAddressOpt)), userAddressOpt)
103+ let customName = valueOrElse(getString(acres2Contract, keyAddressToCustomName(userAddressOpt)), userAddressOpt)
104104 let refByKey = keyAddressRefBy(userAddressOpt)
105- let refBy = getString(stakingContract, refByKey)
106- let refs = valueOrElse(getString(stakingContract, keyAddressReferrals(userAddressOpt)), "")
107- let lastTxId = valueOrElse(getString(stakingContract, keyLastTxIdByUser(userAddressOpt)), "")
105+ let refBy = getString(acres2Contract, refByKey)
106+ let refs = valueOrElse(getString(acres2Contract, keyAddressReferrals(userAddressOpt)), "")
107+ let lastTxId = valueOrElse(getString(acres2Contract, keyLastTxIdByUser(userAddressOpt)), "")
108108 let acresBalance = if (isDefined(addr))
109109 then assetBalance(value(addr), acresAssetId)
110110 else 0
111- let stakedAcres = valueOrElse(getInteger(stakingContract, keyAcresStakedAmountByUser(userAddressOpt)), 0)
111+ let stakedAcres = valueOrElse(getInteger(acres2Contract, keyAcresStakedAmtByUser(userAddressOpt)), 0)
112112 let lvl = getLevelByAcres(acresBalance)
113113 [("%s%s__customName__" + customName), ("%s%s__referredBy__" + valueOrElse(refBy, "")), ("%s%s__referrals__" + refs), ("%s%s__lastTxId__" + lastTxId), ("%s%d__wavesBalance__" + toString(balance.available)), ("%s%d__wlgoldBalance__" + toString(wlgoldBalance)), ("%s%d__acresBalance__" + toString(acresBalance)), ("%s%d__stakedAcres__" + toString(stakedAcres)), ("%s%d__currentLvl__" + toString(lvl))]
114114 }
134134
135135 $f0_2($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)
136136 }
137-[StringEntry(keyRestCfg(), makeString(descr :: contracts, SEP)), StringEntry(keyRestAddress(), toString(this))]
137+[StringEntry(keyRestCfg(), makeString(descr :: contracts, SEP)), StringEntry(keyRest2Address(), toString(this))]
138138 }
139139
140140
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let SEP = "__"
55
6-let MULT8 = 100000000
7-
86 let chain = take(drop(this.bytes, 1), 1)
97
10-let defaultRestAddressStr = match chain {
8+let defaultRest2AddressStr = match chain {
119 case _ =>
1210 if ((base58'2W' == $match0))
13- then "3P..."
11+ then "3PFwYta8biEz31zpeFe5DJK8wE5trSpQVF8"
1412 else if ((base58'2T' == $match0))
15- then "3M..."
13+ then "3N7UuYar6264P58FBhVWKPQAh4Yua2hgngv"
1614 else throw("Unknown chain")
1715 }
1816
1917 func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], ""))
2018
2119
22-let IdxCfgAcresDapp = 1
20+let IdxCfgAcres2Dapp = 1
2321
2422 let IdxCfgWlgDapp = 2
2523
2624 func keyRestCfg () = "%s__restConfig"
2725
2826
29-func keyRestAddress () = "%s__restAddr"
27+func keyRest2Address () = "%s__rest2Addr"
3028
3129
3230 func readRestCfgOrFail (rest) = split_4C(getStringOrFail(rest, keyRestCfg()), SEP)
3331
3432
35-func getContractAddressOrFail (restCfg,idx) = valueOrErrorMessage(addressFromString(restCfg[idx]), ("Rest cfg doesn't contain address at index " + toString(idx)))
33+func getContractAddressOrFail (rest2Cfg,idx) = valueOrErrorMessage(addressFromString(rest2Cfg[idx]), ("Rest cfg doesn't contain address at index " + toString(idx)))
3634
3735
38-let restContract = addressFromStringValue(valueOrElse(getString(this, keyRestAddress()), defaultRestAddressStr))
36+let rest2Contract = addressFromStringValue(valueOrElse(getString(this, keyRest2Address()), defaultRest2AddressStr))
3937
40-let restCfg = readRestCfgOrFail(restContract)
38+let rest2Cfg = readRestCfgOrFail(rest2Contract)
4139
42-let stakingContract = getContractAddressOrFail(restCfg, IdxCfgAcresDapp)
40+let acres2Contract = getContractAddressOrFail(rest2Cfg, IdxCfgAcres2Dapp)
4341
44-let wlgContract = getContractAddressOrFail(restCfg, IdxCfgWlgDapp)
42+let wlgContract = getContractAddressOrFail(rest2Cfg, IdxCfgWlgDapp)
4543
4644 func keyLastTxIdByUser (addr) = ("lastTxIdByUser_" + addr)
4745
4846
4947 let wlgAssetIdKey = "wlg_assetId"
5048
5149 let wlgAssetId = valueOrErrorMessage(getBinary(wlgContract, wlgAssetIdKey), "WLGOLD is not issued yet")
5250
5351 let acresAssetIdKey = "acresAssetId"
5452
55-let acresAssetId = valueOrErrorMessage(getBinary(stakingContract, acresAssetIdKey), "ACRES is not issued yet")
53+let acresAssetId = valueOrErrorMessage(getBinary(acres2Contract, acresAssetIdKey), "ACRES is not issued yet")
54+
55+func keyAddressToCustomName (addr) = ("accountCustomNameByAddr_" + addr)
56+
57+
58+func keyAddressRefBy (addr) = ("accRefBy_" + addr)
59+
60+
61+func keyAddressReferrals (addr) = ("accReferrals_" + addr)
62+
63+
64+let M8_ = 100000000
65+
66+func keyAcresStakedAmtByUser (addr) = ("acresStakedAmountByUser_" + addr)
67+
5668
5769 let levels = [10, 20, 40, 80, 150, 250, 400, 700, 1000]
5870
5971 func getLevelByAcres (acres) = {
60- let acr = (acres / MULT8)
72+ let acr = (acres / M8_)
6173 func checker (acc,item) = if ((item > acr))
6274 then acc
6375 else (acc + 1)
6476
6577 let idx = {
6678 let $l = levels
6779 let $s = size($l)
6880 let $acc0 = 0
6981 func $f0_1 ($a,$i) = if (($i >= $s))
7082 then $a
7183 else checker($a, $l[$i])
7284
7385 func $f0_2 ($a,$i) = if (($i >= $s))
7486 then $a
7587 else throw("List size exceeds 10")
7688
7789 $f0_2($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)
7890 }
7991 (idx + 1)
8092 }
8193
8294
83-func keyAddressToCustomName (addr) = ("accountCustomNameByAddr_" + addr)
84-
85-
86-func keyAddressRefBy (addr) = ("accRefBy_" + addr)
87-
88-
89-func keyAddressReferrals (addr) = ("accReferrals_" + addr)
90-
91-
92-func keyAcresStakedAmountByUser (addr) = ("acresStakedAmountByUser_" + addr)
93-
94-
9595 func walletInternal (userAddressOpt) = {
9696 let addr = addressFromString(userAddressOpt)
9797 let balance = if (isDefined(addr))
9898 then wavesBalance(value(addr))
9999 else BalanceDetails(0, 0, 0, 0)
100100 let wlgoldBalance = if (isDefined(addr))
101101 then assetBalance(value(addr), wlgAssetId)
102102 else 0
103- let customName = valueOrElse(getString(stakingContract, keyAddressToCustomName(userAddressOpt)), userAddressOpt)
103+ let customName = valueOrElse(getString(acres2Contract, keyAddressToCustomName(userAddressOpt)), userAddressOpt)
104104 let refByKey = keyAddressRefBy(userAddressOpt)
105- let refBy = getString(stakingContract, refByKey)
106- let refs = valueOrElse(getString(stakingContract, keyAddressReferrals(userAddressOpt)), "")
107- let lastTxId = valueOrElse(getString(stakingContract, keyLastTxIdByUser(userAddressOpt)), "")
105+ let refBy = getString(acres2Contract, refByKey)
106+ let refs = valueOrElse(getString(acres2Contract, keyAddressReferrals(userAddressOpt)), "")
107+ let lastTxId = valueOrElse(getString(acres2Contract, keyLastTxIdByUser(userAddressOpt)), "")
108108 let acresBalance = if (isDefined(addr))
109109 then assetBalance(value(addr), acresAssetId)
110110 else 0
111- let stakedAcres = valueOrElse(getInteger(stakingContract, keyAcresStakedAmountByUser(userAddressOpt)), 0)
111+ let stakedAcres = valueOrElse(getInteger(acres2Contract, keyAcresStakedAmtByUser(userAddressOpt)), 0)
112112 let lvl = getLevelByAcres(acresBalance)
113113 [("%s%s__customName__" + customName), ("%s%s__referredBy__" + valueOrElse(refBy, "")), ("%s%s__referrals__" + refs), ("%s%s__lastTxId__" + lastTxId), ("%s%d__wavesBalance__" + toString(balance.available)), ("%s%d__wlgoldBalance__" + toString(wlgoldBalance)), ("%s%d__acresBalance__" + toString(acresBalance)), ("%s%d__stakedAcres__" + toString(stakedAcres)), ("%s%d__currentLvl__" + toString(lvl))]
114114 }
115115
116116
117117 @Callable(i)
118118 func constructorV1 (contracts) = if ((i.caller != this))
119119 then throw("permissions denied")
120120 else {
121121 func descriptor (acc,ignoredItem) = (acc + "%s")
122122
123123 let descr = {
124124 let $l = contracts
125125 let $s = size($l)
126126 let $acc0 = ""
127127 func $f0_1 ($a,$i) = if (($i >= $s))
128128 then $a
129129 else descriptor($a, $l[$i])
130130
131131 func $f0_2 ($a,$i) = if (($i >= $s))
132132 then $a
133133 else throw("List size exceeds 10")
134134
135135 $f0_2($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)
136136 }
137-[StringEntry(keyRestCfg(), makeString(descr :: contracts, SEP)), StringEntry(keyRestAddress(), toString(this))]
137+[StringEntry(keyRestCfg(), makeString(descr :: contracts, SEP)), StringEntry(keyRest2Address(), toString(this))]
138138 }
139139
140140
141141
142142 @Callable(i)
143143 func walletInfoREADONLY (userAddressOpt) = $Tuple2(nil, walletInternal(userAddressOpt))
144144
145145

github/deemru/w8io/169f3d6 
65.01 ms