tx · 5F3pKCFMx5YJiFho5YYn7tbZJNyXQLWLeJXdLVpRVf6K

3N2HzcM61QM3LsUrsq4UBvi2btJMHyxvVMD:  -0.00200000 Waves

2022.07.14 19:03 [2139605] smart account 3N2HzcM61QM3LsUrsq4UBvi2btJMHyxvVMD > SELF 0.00000000 Waves

{ "type": 13, "id": "5F3pKCFMx5YJiFho5YYn7tbZJNyXQLWLeJXdLVpRVf6K", "fee": 200000, "feeAssetId": null, "timestamp": 1657814638148, "version": 2, "chainId": 84, "sender": "3N2HzcM61QM3LsUrsq4UBvi2btJMHyxvVMD", "senderPublicKey": "CU5wMqCBg4bC4Zgs8QGiqjjvmeMkSiKo3Ff6k5axJZwr", "proofs": [ "vY74cLFPD6kNs7qCpSmmTPztWMc2rXfKkkbyLHLezjiSn515YBLVc5tzkWPU6g2Rrv2eHUUF3mux9HaGAmFeCjQ" ], "script": "base64:AAIDAAAAAAAAAAkIARIAEgMKAQEAAAABAAAAAAdnZ1Rva2VuAQAAACBrVOjHv/ccQBeJZW/zYCjZI72Il39H9014vm+87tzFkAAAAAIAAAABaQEAAAAHZGVwb3NpdAAAAAAEAAAAA3BtdAkBAAAAB2V4dHJhY3QAAAABCAUAAAABaQAAAAdwYXltZW50AwkBAAAAAiE9AAAAAggFAAAAA3BtdAAAAAdhc3NldElkBQAAAAdnZ1Rva2VuCQAAAgAAAAECAAAATmdnVG9rZW4gOER5aWR2cTh5a1d4bXY2Q3haWlhRdGRqMWFrdGl3UHY0aWJnR1dUZ3hvNWggdG9rZW5zIG9ubHkgYXQgdGhlIG1vbWVudAQAAAAKY3VycmVudEtleQkAAlgAAAABCAgFAAAAAWkAAAAGY2FsbGVyAAAABWJ5dGVzBAAAAA1jdXJyZW50QW1vdW50BAAAAAckbWF0Y2gwCQAEGgAAAAIFAAAABHRoaXMFAAAACmN1cnJlbnRLZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAA0ludAQAAAABYQUAAAAHJG1hdGNoMAUAAAABYQAAAAAAAAAAAAQAAAAJbmV3QW1vdW50CQAAZAAAAAIFAAAADWN1cnJlbnRBbW91bnQIBQAAAANwbXQAAAAGYW1vdW50CQEAAAAIV3JpdGVTZXQAAAABCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACBQAAAApjdXJyZW50S2V5BQAAAAluZXdBbW91bnQFAAAAA25pbAAAAAFpAQAAAAh3aXRoZHJhdwAAAAEAAAAGYW1vdW50BAAAAApjdXJyZW50S2V5CQACWAAAAAEICAUAAAABaQAAAAZjYWxsZXIAAAAFYnl0ZXMEAAAADWN1cnJlbnRBbW91bnQEAAAAByRtYXRjaDAJAAQaAAAAAgUAAAAEdGhpcwUAAAAKY3VycmVudEtleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAADSW50BAAAAAFhBQAAAAckbWF0Y2gwBQAAAAFhAAAAAAAAAAAABAAAAAluZXdBbW91bnQJAABlAAAAAgUAAAANY3VycmVudEFtb3VudAUAAAAGYW1vdW50AwkAAGYAAAACAAAAAAAAAAAABQAAAAZhbW91bnQJAAACAAAAAQIAAAAeQ2FuJ3Qgd2l0aGRyYXcgbmVnYXRpdmUgYW1vdW50AwkAAGYAAAACAAAAAAAAAAAABQAAAAluZXdBbW91bnQJAAACAAAAAQIAAAASTm90IGVub3VnaCBiYWxhbmNlCQEAAAAMU2NyaXB0UmVzdWx0AAAAAgkBAAAACFdyaXRlU2V0AAAAAQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgUAAAAKY3VycmVudEtleQUAAAAJbmV3QW1vdW50BQAAAANuaWwJAQAAAAtUcmFuc2ZlclNldAAAAAEJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwgFAAAAAWkAAAAGY2FsbGVyBQAAAAZhbW91bnQFAAAABHVuaXQFAAAAA25pbAAAAAAGziiX", "height": 2139605, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 3Ehj6hcTZyFvDTKHB2Bzh5u5j6K6NErjsBaQ42czgayn Next: D6MbMuk1EUqS8UQ3Z34NeEFBv5rSJm8YteXRWvNRWAxH Diff:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4+let ggToken = base58'8Dyidvq8ykWxmv6CxZZXQtdj1aktiwPv4ibgGWTgxo5h'
5+
6+@Callable(i)
7+func deposit () = {
8+ let pmt = extract(i.payment)
9+ if ((pmt.assetId != ggToken))
10+ then throw("ggToken 8Dyidvq8ykWxmv6CxZZXQtdj1aktiwPv4ibgGWTgxo5h tokens 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+
424
525
626 @Callable(i)
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4+let ggToken = base58'8Dyidvq8ykWxmv6CxZZXQtdj1aktiwPv4ibgGWTgxo5h'
5+
6+@Callable(i)
7+func deposit () = {
8+ let pmt = extract(i.payment)
9+ if ((pmt.assetId != ggToken))
10+ then throw("ggToken 8Dyidvq8ykWxmv6CxZZXQtdj1aktiwPv4ibgGWTgxo5h tokens 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+
424
525
626 @Callable(i)
727 func withdraw (amount) = {
828 let currentKey = toBase58String(i.caller.bytes)
929 let currentAmount = match getInteger(this, currentKey) {
1030 case a: Int =>
1131 a
1232 case _ =>
1333 0
1434 }
1535 let newAmount = (currentAmount - amount)
1636 if ((0 > amount))
1737 then throw("Can't withdraw negative amount")
1838 else if ((0 > newAmount))
1939 then throw("Not enough balance")
2040 else ScriptResult(WriteSet([DataEntry(currentKey, newAmount)]), TransferSet([ScriptTransfer(i.caller, amount, unit)]))
2141 }
2242
2343

github/deemru/w8io/169f3d6 
29.16 ms