tx · 4i4VficJqq3DjSidDZ67sCEWG7hnnZTyWUcXy1pMWkwK 3MpFYUjf9xgvz61eBjwjsj1F9mmhQjNpfJu: -0.01000000 Waves 2023.04.15 19:15 [2535866] smart account 3MpFYUjf9xgvz61eBjwjsj1F9mmhQjNpfJu > SELF 0.00000000 Waves
{ "type": 13, "id": "4i4VficJqq3DjSidDZ67sCEWG7hnnZTyWUcXy1pMWkwK", "fee": 1000000, "feeAssetId": null, "timestamp": 1681575360415, "version": 2, "chainId": 84, "sender": "3MpFYUjf9xgvz61eBjwjsj1F9mmhQjNpfJu", "senderPublicKey": "AsxTW2DFTyqChejTK5BZthqmoB2pX21ZJhB5R1N7LXRM", "proofs": [ "SuM9iwscH7YQT5ErXpSYttRzdeAq2Yf7ZjjgWUYVN2C671xXaKTnjMawczN3JhorjZW4N6GTpospc5Z5Eod7kWv" ], "script": "base64:AAIFAAAAAAAAABcIAhIAEgMKAQESABIDCgEBEgASAwoBAQAAAAMAAAAABHVzZE4BAAAAINdSkRj0X0+lXoTbibwZKGxwezjGpc3PoC6ezdqH7+NgAAAAAAR1c2RDAQAAACD0HLk3GIOJeFIeiGiWi1sorjYJlG3kH4D2RHpd3gl4DAAAAAAFd2F2ZXMBAAAAILnzUlPjKqBuy8fo+4a2JypuPgYDalMYcMQU5JM5I/ATAAAABgAAAAFpAQAAAAp1c2ROX3N0YWtlAAAAAAMJAQAAAAIhPQAAAAIICQABkQAAAAIIBQAAAAFpAAAACHBheW1lbnRzAAAAAAAAAAAAAAAAB2Fzc2V0SWQFAAAABHVzZE4JAAACAAAAAQIAAAAQdW5leHBlY3RlZCBhc3NldAQAAAAQY3VycmVudExpcXVpZGl0eQkBAAAAC3ZhbHVlT3JFbHNlAAAAAgkABBoAAAACBQAAAAR0aGlzCQAEJQAAAAEIBQAAAAFpAAAADG9yaWdpbkNhbGxlcgAAAAAAAAAAAAkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgkABCUAAAABCAUAAAABaQAAAAx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naW5DYWxsZXIFAAAABmFtb3VudAkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADCAUAAAABaQAAAAxvcmlnaW5DYWxsZXIFAAAABmFtb3VudAUAAAAEdXNkQwUAAAADbmlsCQAAAgAAAAECAAAADnRvbyBiaWcgYW1vdW50AAAAAWkBAAAAC3dhdmVzX3N0YWtlAAAAAAMJAQAAAAIhPQAAAAIICQABkQAAAAIIBQAAAAFpAAAACHBheW1lbnRzAAAAAAAAAAAAAAAAB2Fzc2V0SWQFAAAABXdhdmVzCQAAAgAAAAECAAAAEHVuZXhwZWN0ZWQgYXNzZXQEAAAAEGN1cnJlbnRMaXF1aWRpdHkJAQAAAAt2YWx1ZU9yRWxzZQAAAAIJAAQaAAAAAgUAAAAEdGhpcwkABCUAAAABCAUAAAABaQAAAAxvcmlnaW5DYWxsZXIAAAAAAAAAAAAJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAIJAAQlAAAAAQgFAAAAAWkAAAAMb3JpZ2luQ2FsbGVyCQAAZAAAAAIFAAAAEGN1cnJlbnRMaXF1aWRpdHkICQABkQAAAAIIBQAAAAFpAAAACHBheW1lbnRzAAAAAAAAAAAAAAAABmFtb3VudAUAAAADbmlsAAAAAWkBAAAAEXdhdmVzX2NhbmNlbFN0YWtlAAAAAQAAAAZhbW91bnQDCQAAZwAAAAIJAQAAABFAZXh0ck5hdGl2ZSgxMDUwKQAAAAIFAAAABHRoaXMJAAQlAAAAAQgFAAAAAWkAAAAMb3JpZ2luQ2FsbGVyBQAAAAZhbW91bnQJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwgFAAAAAWkAAAAMb3JpZ2luQ2FsbGVyBQAAAAZhbW91bnQFAAAABXdhdmVzBQAAAANuaWwJAAACAAAAAQIAAAAOdG9vIGJpZyBhbW91bnQAAAAAQyprpA==", "height": 2535866, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: ATqVN1hyv1msEYCuVS3m6zc63mq9Q5h5fFmfh4eQ19X2 Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 5 #-} | |
2 | + | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | + | {-# CONTENT_TYPE DAPP #-} | |
4 | + | let usdN = base58'FVXgJ86erBw5GAMeAw1CnYXwQn48BFAEAhRyHPUjbMQB' | |
5 | + | ||
6 | + | let usdC = base58'HRut8ESAGXxwvsKJky1V96qRtqyXQd4Apq4GY7TE5yGP' | |
7 | + | ||
8 | + | let waves = base58'DWscu6nt8HMVq3kR8ySucpjKPpPpAJs2H3mqgpLa6bQW' | |
9 | + | ||
10 | + | @Callable(i) | |
11 | + | func usdN_stake () = if ((i.payments[0].assetId != usdN)) | |
12 | + | then throw("unexpected asset") | |
13 | + | else { | |
14 | + | let currentLiquidity = valueOrElse(getInteger(this, toString(i.originCaller)), 0) | |
15 | + | [IntegerEntry(toString(i.originCaller), (currentLiquidity + i.payments[0].amount))] | |
16 | + | } | |
17 | + | ||
18 | + | ||
19 | + | ||
20 | + | @Callable(i) | |
21 | + | func usdN_cancelStake (amount) = if ((getIntegerValue(this, toString(i.originCaller)) >= amount)) | |
22 | + | then [ScriptTransfer(i.originCaller, amount, usdN)] | |
23 | + | else throw("too big amount") | |
24 | + | ||
25 | + | ||
26 | + | ||
27 | + | @Callable(i) | |
28 | + | func usdC_stake () = if ((i.payments[0].assetId != usdC)) | |
29 | + | then throw("unexpected asset") | |
30 | + | else { | |
31 | + | let currentLiquidity = valueOrElse(getInteger(this, toString(i.originCaller)), 0) | |
32 | + | [IntegerEntry(toString(i.originCaller), (currentLiquidity + i.payments[0].amount))] | |
33 | + | } | |
34 | + | ||
35 | + | ||
36 | + | ||
37 | + | @Callable(i) | |
38 | + | func usdC_cancelStake (amount) = if ((getIntegerValue(this, toString(i.originCaller)) >= amount)) | |
39 | + | then [ScriptTransfer(i.originCaller, amount, usdC)] | |
40 | + | else throw("too big amount") | |
41 | + | ||
42 | + | ||
43 | + | ||
44 | + | @Callable(i) | |
45 | + | func waves_stake () = if ((i.payments[0].assetId != waves)) | |
46 | + | then throw("unexpected asset") | |
47 | + | else { | |
48 | + | let currentLiquidity = valueOrElse(getInteger(this, toString(i.originCaller)), 0) | |
49 | + | [IntegerEntry(toString(i.originCaller), (currentLiquidity + i.payments[0].amount))] | |
50 | + | } | |
51 | + | ||
52 | + | ||
53 | + | ||
54 | + | @Callable(i) | |
55 | + | func waves_cancelStake (amount) = if ((getIntegerValue(this, toString(i.originCaller)) >= amount)) | |
56 | + | then [ScriptTransfer(i.originCaller, amount, waves)] | |
57 | + | else throw("too big amount") | |
58 | + | ||
59 | + |
github/deemru/w8io/169f3d6 36.20 ms ◑