tx · B2iDBSi6ZBY6NztPe2n4PkbW9xmJHjpfmU2ayxWNbuua 3MtPKSuzEeiKxJSp25VoPgmPNcbf3LJPA29: -0.01400000 Waves 2022.01.30 03:15 [1900938] smart account 3MtPKSuzEeiKxJSp25VoPgmPNcbf3LJPA29 > SELF 0.00000000 Waves
{ "type": 13, "id": "B2iDBSi6ZBY6NztPe2n4PkbW9xmJHjpfmU2ayxWNbuua", "fee": 1400000, "feeAssetId": null, "timestamp": 1643501747619, "version": 2, "chainId": 84, "sender": "3MtPKSuzEeiKxJSp25VoPgmPNcbf3LJPA29", "senderPublicKey": "Cx4Hw9uUeD1BmLqL7uozAJqXLoTGWM1Nxyim1g3L9BMH", "proofs": [ "3xYKyfVDcMByw7W32jgia6w17WKmTCgru3v327UPssL1TjYgNDrd2RGQZcmrS7iW36WALFBhTJKFkQW3C5Km1AQA" ], "script": "base64:AAIFAAAAAAAAAAgIAhIAEgASAAAAAAMAAAAAC2Jkc21Bc3NldElkAQAAACBV7sO+qgvwUOhxyBuqbnCepLHI/kouucHxzMVrD3iXSwAAAAAETU9URAIAAAAQVVBEQVRFRCBCWSBTTkFLRQAAAAAGYmRtc1NDAQAAABoBV5q1nbiLPkFqa+QYnS47CnavBiLQNYp1EAAAAAMAAAABaQEAAAAEYmRzbQAAAAAEAAAAC3dhdmVzQW1vdW50CAkAA+8AAAABBQAAAAR0aGlzAAAACWF2YWlsYWJsZQQAAAAKYmRzbUFtb3VudAkAA/AAAAACBQAAAAR0aGlzBQAAAAtiZHNtQXNzZXRJZAQAAAABcgkAA/wAAAAECQEAAAAHQWRkcmVzcwAAAAEFAAAABmJkbXNTQwIAAAAHYnV5TnNidAUAAAADbmlsCQAETAAAAAIJAQAAAA9BdHRhY2hlZFBheW1lbnQAAAACBQAAAAR1bml0AAAAAAA7msoABQAAAANuaWwDCQAAAAAAAAIFAAAAAXIFAAAAAXIEAAAADm5ld1dhdmVzQW1vdW50CAkAA+8AAAABBQAAAAR0aGlzAAAACWF2YWlsYWJsZQQAAAANbmV3QmRzbUFtb3VudAkAA/AAAAACBQAAAAR0aGlzBQAAAAtiZHNtQXNzZXRJZAMJAABmAAAAAgkAAGUAAAACBQAAAA1uZXdCZHNtQW1vdW50BQAAAApiZHNtQW1vdW50AAAAAAAAmJaABQAAAANuaWwJAAACAAAAAQkAASwAAAACCQABLAAAAAIJAAEsAAAAAgkAASwAAAACCQABLAAAAAIJAAEsAAAAAgkAASwAAAACAgAAAAN3OiAJAAGkAAAAAQUAAAALd2F2ZXNBbW91bnQCAAAABSwgYjogCQABpAAAAAEFAAAACmJkc21BbW91bnQCAAAAB3cgbmV3OiAJAAGkAAAAAQUAAAAObmV3V2F2ZXNBbW91bnQCAAAACSwgYiBuZXc6IAkAAaQAAAABBQAAAA1uZXdCZHNtQW1vdW50CQAAAgAAAAECAAAAB2JhZCByZXEAAAABaQEAAAAFY2FsbDEAAAAABAAAAAFyCQAD/AAAAAQFAAAABHRoaXMCAAAABWNhbGwyBQAAAANuaWwFAAAAA25pbAMJAAAAAAAAAgUAAAABcgUAAAABcgUAAAADbmlsCQAAAgAAAAECAAAAB2JhZCByZXEAAAABaQEAAAAFY2FsbDIAAAAABAAAAAFyCQAD/AAAAAQFAAAABHRoaXMCAAAABWNhbGwxBQAAAANuaWwFAAAAA25pbAMJAAAAAAAAAgUAAAABcgUAAAABcgUAAAADbmlsCQAAAgAAAAECAAAAB2JhZCByZXEAAAAAkKs3WA==", "height": 1900938, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: none Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 5 #-} | |
2 | + | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | + | {-# CONTENT_TYPE DAPP #-} | |
4 | + | let bdsmAssetId = base58'6nSpVyNH7yM69eg446wrQR94ipbbcmZMU1ENPwanC97g' | |
5 | + | ||
6 | + | let MOTD = "UPDATED BY SNAKE" | |
7 | + | ||
8 | + | let bdmsSC = base58'3PG2vMhK5CPqsCDodvLGzQ84QkoHXCJ3oNP' | |
9 | + | ||
10 | + | @Callable(i) | |
11 | + | func bdsm () = { | |
12 | + | let wavesAmount = wavesBalance(this).available | |
13 | + | let bdsmAmount = assetBalance(this, bdsmAssetId) | |
14 | + | let r = invoke(Address(bdmsSC), "buyNsbt", nil, [AttachedPayment(unit, 1000000000)]) | |
15 | + | if ((r == r)) | |
16 | + | then { | |
17 | + | let newWavesAmount = wavesBalance(this).available | |
18 | + | let newBdsmAmount = assetBalance(this, bdsmAssetId) | |
19 | + | if (((newBdsmAmount - bdsmAmount) > 10000000)) | |
20 | + | then nil | |
21 | + | else throw(((((((("w: " + toString(wavesAmount)) + ", b: ") + toString(bdsmAmount)) + "w new: ") + toString(newWavesAmount)) + ", b new: ") + toString(newBdsmAmount))) | |
22 | + | } | |
23 | + | else throw("bad req") | |
24 | + | } | |
25 | + | ||
26 | + | ||
27 | + | ||
28 | + | @Callable(i) | |
29 | + | func call1 () = { | |
30 | + | let r = invoke(this, "call2", nil, nil) | |
31 | + | if ((r == r)) | |
32 | + | then nil | |
33 | + | else throw("bad req") | |
34 | + | } | |
35 | + | ||
36 | + | ||
37 | + | ||
38 | + | @Callable(i) | |
39 | + | func call2 () = { | |
40 | + | let r = invoke(this, "call1", nil, nil) | |
41 | + | if ((r == r)) | |
42 | + | then nil | |
43 | + | else throw("bad req") | |
44 | + | } | |
45 | + | ||
46 | + |
github/deemru/w8io/169f3d6 39.60 ms ◑