tx · 58dQx1o1hZMQgtvtSheED8uUiKMUZn2G7KdQNBH1Ztb6
3N2HzcM61QM3LsUrsq4UBvi2btJMHyxvVMD: -0.00100000 Waves
2022.07.14 22:11 [2139795] smart account 3N2HzcM61QM3LsUrsq4UBvi2btJMHyxvVMD > SELF 0.00000000 Waves
{
"type": 13,
"id": "58dQx1o1hZMQgtvtSheED8uUiKMUZn2G7KdQNBH1Ztb6",
"fee": 100000,
"feeAssetId": null,
"timestamp": 1657825926624,
"version": 2,
"chainId": 84,
"sender": "3N2HzcM61QM3LsUrsq4UBvi2btJMHyxvVMD",
"senderPublicKey": "CU5wMqCBg4bC4Zgs8QGiqjjvmeMkSiKo3Ff6k5axJZwr",
"proofs": [
"5bVtMGUsocxc5evLEqAGmySFyGLyKTgrkbavjU2M5HPi1rCYsD62fVvosgJt3b33tAGEo2oTsEDWbt2gQPEBTuT5"
],
"script": "base64:AAIDAAAAAAAAAAwIARIDCgEBEgMKAQEAAAACAAAAAAVnd1VzZAEAAAAg1td3yV5SV/9sTRnPub7Z/8+5gW83ZtDAi9MIvEJ2JY0AAAAABHVzZG4BAAAAIA/yHBKs5MQ8muxGGqslqLDsugcrRsxtiHLwteKSSQG0AAAAAgAAAAFpAQAAAA9zd2FwR0d1c2RUb1VzZG4AAAABAAAABmFtb3VudAQAAAAKY3VycmVudEtleQkAAlgAAAABCAgFAAAAAWkAAAAGY2FsbGVyAAAABWJ5dGVzBAAAAA1jdXJyZW50QW1vdW50BAAAAAckbWF0Y2gwCQAEGgAAAAIFAAAABHRoaXMFAAAACmN1cnJlbnRLZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAA0ludAQAAAABYQUAAAAHJG1hdGNoMAUAAAABYQAAAAAAAAAAAAkBAAAAC1RyYW5zZmVyU2V0AAAAAQkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADCAUAAAABaQAAAAZjYWxsZXIFAAAABmFtb3VudAUAAAAEdXNkbgUAAAADbmlsAAAAAWkBAAAAD3N3YXBVc2RuVG9HR3VzZAAAAAEAAAAGYW1vdW50BAAAAApjdXJyZW50S2V5CQACWAAAAAEICAUAAAABaQAAAAZjYWxsZXIAAAAFYnl0ZXMEAAAADWN1cnJlbnRBbW91bnQEAAAAByRtYXRjaDAJAAQaAAAAAgUAAAAEdGhpcwUAAAAKY3VycmVudEtleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAADSW50BAAAAAFhBQAAAAckbWF0Y2gwBQAAAAFhAAAAAAAAAAAACQEAAAALVHJhbnNmZXJTZXQAAAABCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMIBQAAAAFpAAAABmNhbGxlcgUAAAAGYW1vdW50BQAAAAVnd1VzZAUAAAADbmlsAAAAAPt+flo=",
"height": 2139795,
"applicationStatus": "succeeded",
"spentComplexity": 0
}
View: original | compacted
Prev: BChH6EyfqYX3bdFzqQZpyYBe4LgJ8UpYabdXzG1xysqw
Next: A2CC27i7kagL5XPhpvnUUDwFAEg9gk2kw9Vor2w4cNk8
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 3 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | | - | let a = base58'8Dyidvq8ykWxmv6CxZZXQtdj1aktiwPv4ibgGWTgxo5h' |
---|
| 4 | + | let a = base58'FTeosv2BmZED7kBcGnqDy9tba1VdkeodQveSAATMQusJ' |
---|
5 | 5 | | |
---|
6 | | - | @Callable(b) |
---|
7 | | - | func deposit () = { |
---|
8 | | - | let c = extract(b.payment) |
---|
9 | | - | if ((c.assetId != a)) |
---|
10 | | - | then throw("ggToken 8Dyidvq8ykWxmv6CxZZXQtdj1aktiwPv4ibgGWTgxo5h tokens only at the moment") |
---|
11 | | - | else { |
---|
12 | | - | let d = toBase58String(b.caller.bytes) |
---|
13 | | - | let e = { |
---|
14 | | - | let f = getInteger(this, d) |
---|
15 | | - | if ($isInstanceOf(f, "Int")) |
---|
16 | | - | then { |
---|
17 | | - | let g = f |
---|
18 | | - | g |
---|
19 | | - | } |
---|
20 | | - | else 0 |
---|
| 6 | + | let b = base58'25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT' |
---|
| 7 | + | |
---|
| 8 | + | @Callable(c) |
---|
| 9 | + | func swapGGusdToUsdn (d) = { |
---|
| 10 | + | let e = toBase58String(c.caller.bytes) |
---|
| 11 | + | let f = { |
---|
| 12 | + | let g = getInteger(this, e) |
---|
| 13 | + | if ($isInstanceOf(g, "Int")) |
---|
| 14 | + | then { |
---|
| 15 | + | let h = g |
---|
| 16 | + | h |
---|
21 | 17 | | } |
---|
22 | | - | let h = (e + c.amount) |
---|
23 | | - | WriteSet([DataEntry(d, h)]) |
---|
24 | | - | } |
---|
| 18 | + | else 0 |
---|
| 19 | + | } |
---|
| 20 | + | TransferSet([ScriptTransfer(c.caller, d, b)]) |
---|
25 | 21 | | } |
---|
26 | 22 | | |
---|
27 | 23 | | |
---|
28 | 24 | | |
---|
29 | | - | @Callable(b) |
---|
30 | | - | func withdraw (i) = { |
---|
31 | | - | let d = toBase58String(b.caller.bytes) |
---|
32 | | - | let e = { |
---|
33 | | - | let f = getInteger(this, d) |
---|
34 | | - | if ($isInstanceOf(f, "Int")) |
---|
| 25 | + | @Callable(c) |
---|
| 26 | + | func swapUsdnToGGusd (d) = { |
---|
| 27 | + | let e = toBase58String(c.caller.bytes) |
---|
| 28 | + | let f = { |
---|
| 29 | + | let g = getInteger(this, e) |
---|
| 30 | + | if ($isInstanceOf(g, "Int")) |
---|
35 | 31 | | then { |
---|
36 | | - | let g = f |
---|
37 | | - | g |
---|
| 32 | + | let h = g |
---|
| 33 | + | h |
---|
38 | 34 | | } |
---|
39 | 35 | | else 0 |
---|
40 | 36 | | } |
---|
41 | | - | let h = (e + i) |
---|
42 | | - | ScriptResult(WriteSet([DataEntry(d, h)]), TransferSet([ScriptTransfer(b.caller, i, base58'FTeosv2BmZED7kBcGnqDy9tba1VdkeodQveSAATMQusJ')])) |
---|
| 37 | + | TransferSet([ScriptTransfer(c.caller, d, a)]) |
---|
43 | 38 | | } |
---|
44 | 39 | | |
---|
45 | 40 | | |
---|