tx · 4MKMPVS2fNroh4Eu9rGne7XCupDKZ14YDz7xVogmAoyP 3N1bfGrC9iBWbv1Rhb64cccc3cQswW8VyCV: -0.01400000 Waves 2020.07.21 10:15 [1096908] smart account 3N1bfGrC9iBWbv1Rhb64cccc3cQswW8VyCV > SELF 0.00000000 Waves
{ "type": 13, "id": "4MKMPVS2fNroh4Eu9rGne7XCupDKZ14YDz7xVogmAoyP", "fee": 1400000, "feeAssetId": null, "timestamp": 1595315723785, "version": 1, "sender": "3N1bfGrC9iBWbv1Rhb64cccc3cQswW8VyCV", "senderPublicKey": "BF56eooJyMKnwSL3B65fqLBFPfubUbW6wdky9pCGQajE", "proofs": [ "4UHEDKtvSk5oumHKHg2E7u87A3utL39EYde62ctLSKCXVnLUDwEkAaKLNCHArbS3eB56ByxV6xiXwUsm4D3iUuPp" ], "script": "base64:AAIDAAAAAAAAAAoIARIGCgQICAgIAAAABQEAAAAOZ2V0TnVtYmVyQnlLZXkAAAABAAAAA2tleQQAAAAHJG1hdGNoMAkABBoAAAACBQAAAAR0aGlzBQAAAANrZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAA0ludAQAAAABYQUAAAAHJG1hdGNoMAUAAAABYQAAAAAAAAAAAAEAAAAOZ2V0U3RyaW5nQnlLZXkAAAABAAAAA2tleQQAAAAHJG1hdGNoMAkABB0AAAACBQAAAAR0aGlzBQAAAANrZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAABlN0cmluZwQAAAABYQUAAAAHJG1hdGNoMAUAAAABYQIAAAAAAQAAAAxnZXRCb29sQnlLZXkAAAABAAAAA2tleQQAAAAHJG1hdGNoMAkABBsAAAACBQAAAAR0aGlzBQAAAANrZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAB0Jvb2xlYW4EAAAAAWEFAAAAByRtYXRjaDAFAAAAAWEHAAAAAAt1c2VyQ3JlYXRlZAIAAAAHQ1JFQVRFRAAAAAANdXNlclN1c3BlbmRlZAIAAAAJU1VTUEVORE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NvY2lhbAkABEwAAAACBQAAAAplbnRyeVRodW1iCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACCQABLAAAAAICAAAABXVzZXJfBQAAAApjYWxsZXJBZGRyBQAAAAJpZAUAAAADbmlsCQEAAAAIV3JpdGVTZXQAAAABCQAETAAAAAIFAAAAC2VudHJpZXNOYW1lCQAETAAAAAIFAAAACWVudHJ5RGVzYwkABEwAAAACBQAAAAtlbnRyeVNvY2lhbAkABEwAAAACBQAAAAplbnRyeVRodW1iBQAAAANuaWwAAAAAzh/1nw==", "chainId": 84, "height": 1096908, "spentComplexity": 0 } View: original | compacted Prev: 2yjW4bJTeTuPYiNMHhjSGbDT1iagWUhgKHNHkRMwMQRN Next: JDF12wDaoKN5UTg7hPNGzsxVj5kpoWYPA4RR5ofbpkDL Diff:
Old | New | Differences | |
---|---|---|---|
34 | 34 | } | |
35 | 35 | ||
36 | 36 | ||
37 | - | @Callable(g) | |
38 | - | func registerUser (h,i,j,k) = { | |
39 | - | let l = toString(addressFromPublicKey(g.callerPublicKey)) | |
40 | - | let m = toBase58String(g.transactionId) | |
41 | - | let n = lastBlock.timestamp | |
42 | - | let o = (((((((((("{\"id\": \"" + m) + "\",\"name\": \"") + h) + "\",\"desc\": \"") + i) + "\",\"social\": \"") + j) + "\",\"thumb\": \"") + k) + "\"}") | |
43 | - | if ((h == "")) | |
44 | - | then throw(("Ton json = " + o)) | |
45 | - | else WriteSet([DataEntry(("user_" + l), o)]) | |
37 | + | let g = "CREATED" | |
38 | + | ||
39 | + | let h = "SUSPENDED" | |
40 | + | ||
41 | + | @Callable(i) | |
42 | + | func registerUser (j,k,l,m) = { | |
43 | + | let n = toString(addressFromPublicKey(i.callerPublicKey)) | |
44 | + | let o = toBase58String(i.transactionId) | |
45 | + | let p = e(("user_" + n)) | |
46 | + | if (if ((j == "")) | |
47 | + | then true | |
48 | + | else (k == "")) | |
49 | + | then throw("Name and description cannot be empty") | |
50 | + | else { | |
51 | + | let q = DataEntry(("user_name_" + n), j) | |
52 | + | let r = DataEntry(("user_desc_" + n), k) | |
53 | + | let s = DataEntry(("user_social_" + n), l) | |
54 | + | let t = DataEntry(("user_thumb_" + n), m) | |
55 | + | if ((p == "")) | |
56 | + | then WriteSet([q, r, s, t, DataEntry(("user_" + n), o)]) | |
57 | + | else WriteSet([q, r, s, t]) | |
58 | + | } | |
46 | 59 | } | |
47 | 60 | ||
48 | 61 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 3 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | func a (b) = { | |
5 | 5 | let c = getInteger(this, b) | |
6 | 6 | if ($isInstanceOf(c, "Int")) | |
7 | 7 | then { | |
8 | 8 | let d = c | |
9 | 9 | d | |
10 | 10 | } | |
11 | 11 | else 0 | |
12 | 12 | } | |
13 | 13 | ||
14 | 14 | ||
15 | 15 | func e (b) = { | |
16 | 16 | let c = getString(this, b) | |
17 | 17 | if ($isInstanceOf(c, "String")) | |
18 | 18 | then { | |
19 | 19 | let d = c | |
20 | 20 | d | |
21 | 21 | } | |
22 | 22 | else "" | |
23 | 23 | } | |
24 | 24 | ||
25 | 25 | ||
26 | 26 | func f (b) = { | |
27 | 27 | let c = getBoolean(this, b) | |
28 | 28 | if ($isInstanceOf(c, "Boolean")) | |
29 | 29 | then { | |
30 | 30 | let d = c | |
31 | 31 | d | |
32 | 32 | } | |
33 | 33 | else false | |
34 | 34 | } | |
35 | 35 | ||
36 | 36 | ||
37 | - | @Callable(g) | |
38 | - | func registerUser (h,i,j,k) = { | |
39 | - | let l = toString(addressFromPublicKey(g.callerPublicKey)) | |
40 | - | let m = toBase58String(g.transactionId) | |
41 | - | let n = lastBlock.timestamp | |
42 | - | let o = (((((((((("{\"id\": \"" + m) + "\",\"name\": \"") + h) + "\",\"desc\": \"") + i) + "\",\"social\": \"") + j) + "\",\"thumb\": \"") + k) + "\"}") | |
43 | - | if ((h == "")) | |
44 | - | then throw(("Ton json = " + o)) | |
45 | - | else WriteSet([DataEntry(("user_" + l), o)]) | |
37 | + | let g = "CREATED" | |
38 | + | ||
39 | + | let h = "SUSPENDED" | |
40 | + | ||
41 | + | @Callable(i) | |
42 | + | func registerUser (j,k,l,m) = { | |
43 | + | let n = toString(addressFromPublicKey(i.callerPublicKey)) | |
44 | + | let o = toBase58String(i.transactionId) | |
45 | + | let p = e(("user_" + n)) | |
46 | + | if (if ((j == "")) | |
47 | + | then true | |
48 | + | else (k == "")) | |
49 | + | then throw("Name and description cannot be empty") | |
50 | + | else { | |
51 | + | let q = DataEntry(("user_name_" + n), j) | |
52 | + | let r = DataEntry(("user_desc_" + n), k) | |
53 | + | let s = DataEntry(("user_social_" + n), l) | |
54 | + | let t = DataEntry(("user_thumb_" + n), m) | |
55 | + | if ((p == "")) | |
56 | + | then WriteSet([q, r, s, t, DataEntry(("user_" + n), o)]) | |
57 | + | else WriteSet([q, r, s, t]) | |
58 | + | } | |
46 | 59 | } | |
47 | 60 | ||
48 | 61 |
github/deemru/w8io/169f3d6 35.90 ms ◑