tx · GEAmUSPSdbA6jcRtyGUL26pQsScaZfjVTMSN6pYwQchv 3MpMuGN8rW9EpPwzETAQz88Pe9TQhSwiriq: -0.01000000 Waves 2023.06.20 10:20 [2630652] smart account 3MpMuGN8rW9EpPwzETAQz88Pe9TQhSwiriq > SELF 0.00000000 Waves
{ "type": 13, "id": "GEAmUSPSdbA6jcRtyGUL26pQsScaZfjVTMSN6pYwQchv", "fee": 1000000, "feeAssetId": null, "timestamp": 1687245604394, "version": 2, "chainId": 84, "sender": "3MpMuGN8rW9EpPwzETAQz88Pe9TQhSwiriq", "senderPublicKey": "57SkjQUEwC1ayCqLbXLuzBqifK6B6SR6rfxtGsbAo3zW", "proofs": [ "2EkXr4e1zcDdVMgNvPRAD2Bt3vsugSLp5GuVL5qaeGssSsNTs34VLLoUoB6129wRtUcm7SkxJQpHTcrdmKidKmW" ], "script": "base64:BgICCAIBARFnZXRBZGRyZXNzQmFsYW5jZQINYWRkcmVzc1N0cmluZw1hc3NldElkU3RyaW5nBAdhZGRyZXNzCQERQGV4dHJOYXRpdmUoMTA2MikBBQ1hZGRyZXNzU3RyaW5nAwkAAAIFDWFzc2V0SWRTdHJpbmcCBVdBVkVTCAkA7wcBBQdhZGRyZXNzB3JlZ3VsYXIEB2Fzc2V0SWQJAJsDAQUNYXNzZXRJZFN0cmluZwkA8AcCBQdhZGRyZXNzBQdhc3NldElkAACI4pxI", "height": 2630652, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: CSQ5CdouS811kjkQ2TSe67nAfHFguYNCUp91VvStf7rB Next: 9SucZkgRaeQN42bYCtauYD2TMv2mbjgek8XUwbKR43jH Full:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | - | func updateInternal () = { | |
5 | - | let setterContract = addressFromStringValue("3Mu5kasZ85VY5xUCpPYoWr6fBzh6eGZwcnt") | |
6 | - | let nn = { | |
7 | - | let @ = invoke(setterContract, "getNum", nil, nil) | |
8 | - | if ($isInstanceOf(@, "Int")) | |
9 | - | then @ | |
10 | - | else throw(($getType(@) + " couldn't be cast to Int")) | |
11 | - | } | |
12 | - | $Tuple2([IntegerEntry("CopyValue", (getIntegerValue(setterContract, "numValue") + nn))], unit) | |
4 | + | func getAddressBalance (addressString,assetIdString) = { | |
5 | + | let address = addressFromStringValue(addressString) | |
6 | + | if ((assetIdString == "WAVES")) | |
7 | + | then wavesBalance(address).regular | |
8 | + | else { | |
9 | + | let assetId = toBytes(assetIdString) | |
10 | + | assetBalance(address, assetId) | |
11 | + | } | |
13 | 12 | } | |
14 | 13 | ||
15 | - | ||
16 | - | @Callable(i) | |
17 | - | func update () = updateInternal() | |
18 | 14 | ||
19 | 15 |
github/deemru/w8io/169f3d6 35.55 ms ◑