tx · BdqtMbDCNtdJcdzZWkxnE5Nb9BAACt7T7o5g3u9JZYqf

3N4UhavKsWv4dPmmhtaYT573ALxuvsAp6M4:  -0.05000000 Waves

2022.06.07 01:09 [2085073] smart account 3N4UhavKsWv4dPmmhtaYT573ALxuvsAp6M4 > SELF 0.00000000 Waves

{ "type": 13, "id": "BdqtMbDCNtdJcdzZWkxnE5Nb9BAACt7T7o5g3u9JZYqf", "fee": 5000000, "feeAssetId": null, "timestamp": 1654553349394, "version": 2, "chainId": 84, "sender": "3N4UhavKsWv4dPmmhtaYT573ALxuvsAp6M4", "senderPublicKey": "5nJ4v4Wx6sdXhiDZNrpW7m1aSDsTgTgFJVBgmPMPtbUM", "proofs": [ "MgQoLa11qw6uezG9LmKPnfEN4ZhthHq9nisZS9aDwxeEaQJDQP2M7nphFfYQBxaiGxrAGgvC1aU9nRmCy8CqGFn" ], "script": "base64:AAIFAAAAAAAAAAwIAhIDCgEIEgMKAQgAAAATAAAAAAZzdGFrZXICAAAABnN0YWtlcgAAAAAFYWRtaW4CAAAABmFkbWluXwAAAAALYXNzZXRJZENhbGwCAAAACEFzc2V0IElEAQAAAARnZXRJAAAAAQAAAANrZXkJAAQaAAAAAgUAAAAEdGhpcwUAAAADa2V5AQAAAARnZXRTAAAAAQAAAANrZXkJAAQdAAAAAgUAAAAEdGhpcwUAAAADa2V5AQAAAAVnZXRJVgAAAAEAAAADa2V5CQEAAAAFdmFsdWUAAAABCQAEGgAAAAIFAAAABHRoaXMFAAAAA2tleQEAAAAFZ2V0U1YAAAABAAAAA2tleQkBAAAABXZhbHVlAAAAAQkABB0AAAACBQAAAAR0aGlzBQAAAANrZXkBAAAAB3Rocm93SWYAAAACAAAACWNvbmRpdGlvbgAAAAVlcnJvcgMFAAAACWNvbmRpdGlvbgkAAAIAAAABBQAAAAVlcnJvcgYAAAAAFHRoaXJ0eURheXNMb2NrUGVyaW9kAAAAAAAAAAAeAAAAABNzaXh0eURheXNMb2NrUGVyaW9kAAAAAAAAA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G5vdCBlcXVhbCB0byBpdHNlbGYuAAAAAFjBXsA=", "height": 2085073, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: GppojEQNZwoerhApmhxUekxdHpzmgoq4P3ynuyyVn8jr Next: Di5CWbCqwbXZRkVmouMKnvWxM2aBCpGgnib3564CTmBe Diff:
OldNewDifferences
107107 let checks = adminOnly(i)
108108 if ((checks == checks))
109109 then {
110- let stakerAddress = toBytes(getSV("staker"))
110+ let stakerAddress = fromBase58String(getSV("staker"))
111111 let run = invoke(Address(stakerAddress), "_getAssetIdByTicker", [AssetTicker], nil)
112112 match run {
113113 case a: String =>
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let staker = "staker"
55
66 let admin = "admin_"
77
88 let assetIdCall = "Asset ID"
99
1010 func getI (key) = getInteger(this, key)
1111
1212
1313 func getS (key) = getString(this, key)
1414
1515
1616 func getIV (key) = value(getInteger(this, key))
1717
1818
1919 func getSV (key) = value(getString(this, key))
2020
2121
2222 func throwIf (condition,error) = if (condition)
2323 then throw(error)
2424 else true
2525
2626
2727 let thirtyDaysLockPeriod = 30
2828
2929 let sixtyDaysLockPeriod = 60
3030
3131 let ninetyDaysLockPeriod = 90
3232
3333 func throwOrReturnI (val,error) = match val {
3434 case val: Int =>
3535 val
3636 case _ =>
3737 throw(error)
3838 }
3939
4040
4141 func throwOrReturnS (val,error) = match val {
4242 case val: String =>
4343 val
4444 case _ =>
4545 throw(error)
4646 }
4747
4848
4949 func writeInt (key,value) = if ((0 > value))
5050 then throw(((("writing negative value " + toString(value)) + " for key ") + key))
5151 else IntegerEntry(key, value)
5252
5353
5454 func writeStr (key,value) = if ((" " == value))
5555 then throw(("writing an empty string " + value))
5656 else StringEntry(key, value)
5757
5858
5959 func writeConstString (key,value) = if (!(isDefined(getS(key))))
6060 then writeStr(key, value)
6161 else throw(("already initialized: " + key))
6262
6363
6464 func writeConstInteger (key,value) = if (!(isDefined(getS(key))))
6565 then writeInt(key, value)
6666 else throw(("already initialized: " + key))
6767
6868
6969 func adminOnly (i) = {
7070 let inputAddress = toBase58String(i.caller.bytes)
7171 let otherAdmin = (admin + inputAddress)
7272 match getS(admin) {
7373 case a: String =>
7474 if ((inputAddress != getS(admin)))
7575 then throw("unauthorized")
7676 else true
7777 case _ =>
7878 match getS(otherAdmin) {
7979 case b: String =>
8080 if ((inputAddress != getS(otherAdmin)))
8181 then throw("unauthorized")
8282 else true
8383 case _ =>
8484 throw("unauthorizd")
8585 }
8686 }
8787 }
8888
8989
9090 func writeConfigValue (key,data) = match data {
9191 case data: String =>
9292 writeConstString(key, data)
9393 case data: Int =>
9494 writeConstInteger(key, data)
9595 case _ =>
9696 throw("unsupported config type")
9797 }
9898
9999
100100 @Callable(i)
101101 func init (stakerAddress) = [writeConstString(staker, stakerAddress), writeConstString(admin, toBase58String(this.bytes))]
102102
103103
104104
105105 @Callable(i)
106106 func getAssetIdByTicker (AssetTicker) = {
107107 let checks = adminOnly(i)
108108 if ((checks == checks))
109109 then {
110- let stakerAddress = toBytes(getSV("staker"))
110+ let stakerAddress = fromBase58String(getSV("staker"))
111111 let run = invoke(Address(stakerAddress), "_getAssetIdByTicker", [AssetTicker], nil)
112112 match run {
113113 case a: String =>
114114 [StringEntry(assetIdCall, a)]
115115 case _ =>
116116 nil
117117 }
118118 }
119119 else throw("Strict value is not equal to itself.")
120120 }
121121
122122

github/deemru/w8io/026f985 
35.27 ms