tx · GBqArdceoo75o4HmfRazGjNtJTZ51g93YpsmgCspasma 3My6LmrRSRvJ73T14oT5k53SGPavGFoacWc: -0.00900000 Waves 2022.12.07 03:06 [2349187] smart account 3My6LmrRSRvJ73T14oT5k53SGPavGFoacWc > SELF 0.00000000 Waves
{ "type": 13, "id": "GBqArdceoo75o4HmfRazGjNtJTZ51g93YpsmgCspasma", "fee": 900000, "feeAssetId": null, "timestamp": 1670371598552, "version": 2, "chainId": 84, "sender": "3My6LmrRSRvJ73T14oT5k53SGPavGFoacWc", "senderPublicKey": "7d1SvcwczqVvG6wiT5VYevFv5gAFtbWZw1SSiEUFkmcD", "proofs": [ "2owcXeitKnGNrZsBkqGvQTbM5z1zqLhFWipT9YwkmiGobzqyAbW8Nbo6C3kgXcn418UDgk1y7bB6n3Db1dqnGYqj" ], "script": null, "height": 2349187, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 14baYxbEnzoCmRBJnKcJ9QqL6L37RCATk5JoriPgHJWS Next: none Full:
Old | New | Differences | |
---|---|---|---|
1 | - | {-# STDLIB_VERSION 6 #-} | |
2 | - | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | - | {-# CONTENT_TYPE DAPP #-} | |
4 | - | let assetId = "HHmaFQpUobwKxzjz4ECaBPtoF69kujKwU2cozaUzTsgv" | |
5 | - | ||
6 | - | func getAssetBytes (assetIdStr) = if ((assetIdStr == "WAVES")) | |
7 | - | then unit | |
8 | - | else fromBase58String(assetIdStr) | |
9 | - | ||
10 | - | ||
11 | - | func getBalance (assetId) = match assetId { | |
12 | - | case x: Unit => | |
13 | - | wavesBalance(this).available | |
14 | - | case _ => | |
15 | - | assetBalance(this, value(assetId)) | |
16 | - | } | |
17 | - | ||
18 | - | ||
19 | - | @Callable(i) | |
20 | - | func withdraw (assetIdStr,assetAmount) = { | |
21 | - | let balance = getBalance(fromBase58String(assetId)) | |
22 | - | if ((assetAmount > balance)) | |
23 | - | then throw("This amount is not available for this user") | |
24 | - | else [ScriptTransfer(i.caller, assetAmount, getAssetBytes(assetIdStr))] | |
25 | - | } | |
26 | - | ||
27 | - | ||
28 | - | ||
29 | - | @Callable(i) | |
30 | - | func deposit () = nil | |
31 | - | ||
32 | - | ||
33 | - | @Verifier(tx) | |
34 | - | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
35 | - | ||
1 | + | # no script |
github/deemru/w8io/169f3d6 20.59 ms ◑![]()