tx · 8uGKB6sqUgYi3TrgW4ehJfgo8zfvNkA5L7np5WjiVd6N

3NADYuG3G91PrmsrRqQfyeDCf2Pi53UV5id:  -0.01400000 Waves

2021.04.21 19:06 [1492441] smart account 3NADYuG3G91PrmsrRqQfyeDCf2Pi53UV5id > SELF 0.00000000 Waves

{ "type": 13, "id": "8uGKB6sqUgYi3TrgW4ehJfgo8zfvNkA5L7np5WjiVd6N", "fee": 1400000, "feeAssetId": null, "timestamp": 1619021167634, "version": 2, "chainId": 84, "sender": "3NADYuG3G91PrmsrRqQfyeDCf2Pi53UV5id", "senderPublicKey": "8agr5kfwDL7NLuMetvciXCcd9TcDKZhRwYZPPTAShaCC", "proofs": [ "pQHekGVAf8JGNvQqd4RXMDB3tjBZYYAhLHqydEcFSfwGQXaw4uMcBkwTSEHLTWLQjD1HgV6FRfVGY2WCr3Njeky" ], "script": "base64:AAIEAAAAAAAAAAQIAhIAAAAAAQAAAAAEVVNETgEAAAAgtiYpwwT1zlORpA5LdSQvZIxRsfrfr1QpvUjSHSqyqtEAAAABAAAAAWkBAAAABGNhbGwAAAAABAAAAAVhc3NldAkABEMAAAAHAgAAAAdMZW9Db2luAgAAAAAAAAAAAAAAAAEAAAAAAAAAAAAGBQAAAAR1bml0AAAAAAAAAAAABAAAAAdhc3NldElkCQAEOAAAAAEFAAAABWFzc2V0CQAETAAAAAIFAAAABWFzc2V0CQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMIBQAAAAFpAAAABmNhbGxlcgAAAAAAAAAAAQUAAAAHYXNzZXRJZAUAAAADbmlsAAAAAL2eI1U=", "height": 1492441, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: Dy4Us2vw6TyWDNWpi77KWH7SctUn5hpmmxfGhHp5F4Kr Next: PPnnDjwPLUVSmrVPcSwaU8KM7PFVynukK5Qe8enxWAt Full:
OldNewDifferences
1-{-# STDLIB_VERSION 3 #-}
1+{-# STDLIB_VERSION 4 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-
4+let USDN = base58'DG2xFkPdDwKUoBkzGAhQtLpSGzfXLiCYPEzeKH2Ad24p'
55
66 @Callable(i)
7-func deposit () = {
8- let pmt = extract(i.payment)
9- if (isDefined(pmt.assetId))
10- then throw("can hodl waves only at the moment")
11- else {
12- let currentKey = toBase58String(i.caller.bytes)
13- let currentAmount = match getInteger(this, currentKey) {
14- case a: Int =>
15- a
16- case _ =>
17- 0
18- }
19- let newAmount = (currentAmount + pmt.amount)
20- WriteSet([DataEntry(currentKey, newAmount)])
21- }
22- }
23-
24-
25-
26-@Callable(i)
27-func withdraw (amount) = {
28- let currentKey = toBase58String(i.caller.bytes)
29- let currentAmount = match getInteger(this, currentKey) {
30- case a: Int =>
31- a
32- case _ =>
33- 0
34- }
35- let newAmount = (currentAmount - amount)
36- if ((0 > amount))
37- then throw("Can't withdraw negative amount")
38- else if ((0 > newAmount))
39- then throw("Not enough balance")
40- else ScriptResult(WriteSet([DataEntry(currentKey, newAmount)]), TransferSet([ScriptTransfer(i.caller, amount, unit)]))
7+func call () = {
8+ let asset = Issue("LeoCoin", "", 1, 0, true, unit, 0)
9+ let assetId = calculateAssetId(asset)
10+[asset, ScriptTransfer(i.caller, 1, assetId)]
4111 }
4212
4313

github/deemru/w8io/169f3d6 
45.89 ms