tx · 83nW6mycVe8FA12XDrkzeUJ15jPmb8XpMzcoBPpWeE47 3Mzc1EHokLPuguwwpKW9retTD9JvM8abaPP: -0.01000000 Waves 2022.03.17 10:00 [1967609] smart account 3Mzc1EHokLPuguwwpKW9retTD9JvM8abaPP > SELF 0.00000000 Waves
{ "type": 13, "id": "83nW6mycVe8FA12XDrkzeUJ15jPmb8XpMzcoBPpWeE47", "fee": 1000000, "feeAssetId": null, "timestamp": 1647500460155, "version": 2, "chainId": 84, "sender": "3Mzc1EHokLPuguwwpKW9retTD9JvM8abaPP", "senderPublicKey": "28pMascxqpomJpGXBUtXAGDmKJFMdTTYvq5KPUuY1DGD", "proofs": [ "4w8Hr6PChGCZuGihGpupNhZJqfwij675njncoCaQnCpWUqKNeD1YLJRKaqLxaW5fcPjosMcEgYQEdXVxPG4eWcEs" ], "script": "base64:AAIFAAAAAAAAAAQIAhIAAAAAAwAAAAAEdXNkTgEAAAAAAAAAAAxleGNoYW5nZVJhdGUAAAAAAAAAAAUAAAAABnN0YWtlcgkBAAAAB0FkZHJlc3MAAAABAQAAAAAAAAABAAAAAWkBAAAAEWV4Y2hhbmdlV2F2ZXNVc2ROAAAAAAMJAQAAAAIhPQAAAAIICQABkQAAAAIIBQAAAAFpAAAACHBheW1lbnRzAAAAAAAAAAAAAAAAB2Fzc2V0SWQFAAAABHVuaXQJAAACAAAAAQIAAAAQdW5leHBlY3RlZCBhc3NldAQAAAABcgkAA/wAAAAEBQAAAAZzdGFrZXICAAAAC2NhbmNlbFN0YWtlCQAETAAAAAIJAABoAAAAAggJAAGRAAAAAggFAAAAAWkAAAAIcGF5bWVudHMAAAAAAAAAAAAAAAAGYW1vdW50BQAAAAxleGNoYW5nZVJhdGUFAAAAA25pbAUAAAADbmlsAwkAAAAAAAACBQAAAAFyBQAAAAFyCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMIBQAAAAFpAAAABmNhbGxlcgkAAGgAAAACCAkAAZEAAAACCAUAAAABaQAAAAhwYXltZW50cwAAAAAAAAAAAAAAAAZhbW91bnQFAAAADGV4Y2hhbmdlUmF0ZQUAAAAEdXNkTgUAAAADbmlsCQAAAgAAAAECAAAAJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgAAAACxJx+i", "height": 1967609, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: GvSnWxQc1C7bCGuuPUeRb9a99dVMCrTyY7NbHjDCBDD5 Next: J27EpaY7vycy3opjrgh8TZ4F3QubpoHaJVoxX644VCDJ Full:
Old | New | Differences | |
---|---|---|---|
1 | - | {-# STDLIB_VERSION | |
1 | + | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | - | let a = | |
4 | + | let a = base58'' | |
5 | 5 | ||
6 | - | let b = | |
6 | + | let b = 5 | |
7 | 7 | ||
8 | - | func c (d,e) = { | |
9 | - | let f = sha256(toBytes((d + e))) | |
10 | - | let g = toInt(f) | |
11 | - | b[(g % a)] | |
12 | - | } | |
8 | + | let c = Address(base58'') | |
13 | 9 | ||
14 | - | ||
15 | - | func h (i) = { | |
16 | - | let j = getString(this, (i + "_a")) | |
17 | - | if ($isInstanceOf(j, "String")) | |
18 | - | then { | |
19 | - | let k = j | |
20 | - | k | |
21 | - | } | |
22 | - | else i | |
23 | - | } | |
24 | - | ||
25 | - | ||
26 | - | @Callable(l) | |
27 | - | func tellme (d) = { | |
28 | - | let m = toBase58String(l.caller.bytes) | |
29 | - | let n = c(d, h(m)) | |
30 | - | WriteSet([DataEntry((m + "3Mzc1EHokLPuguwwpKW9retTD9JvM8abaPP_q"), d), DataEntry((m + "3Mzc1EHokLPuguwwpKW9retTD9JvM8abaPP_a"), n)]) | |
31 | - | } | |
10 | + | @Callable(d) | |
11 | + | func exchangeWavesUsdN () = if ((d.payments[0].assetId != unit)) | |
12 | + | then throw("unexpected asset") | |
13 | + | else { | |
14 | + | let e = invoke(c, "cancelStake", [(d.payments[0].amount * b)], nil) | |
15 | + | if ((e == e)) | |
16 | + | then [ScriptTransfer(d.caller, (d.payments[0].amount * b), a)] | |
17 | + | else throw("Strict value is not equal to itself.") | |
18 | + | } | |
32 | 19 | ||
33 | 20 |
github/deemru/w8io/026f985 26.53 ms ◑