tx · JoYmWzbFSF4u7pxzhmoQuqLMcsu5Q1vyi126YpumFjv 3MzcHAM4DcpYKt1ZAMibQmqU69pKQ6qz3i4: -0.00300000 Waves 2023.03.24 01:34 [2503253] smart account 3MzcHAM4DcpYKt1ZAMibQmqU69pKQ6qz3i4 > SELF 0.00000000 Waves
{ "type": 13, "id": "JoYmWzbFSF4u7pxzhmoQuqLMcsu5Q1vyi126YpumFjv", "fee": 300000, "feeAssetId": null, "timestamp": 1679610901695, "version": 2, "chainId": 84, "sender": "3MzcHAM4DcpYKt1ZAMibQmqU69pKQ6qz3i4", "senderPublicKey": "DoAid1WtwHRuonKq6xKkbxijk1QQhXG75vdyuUM7n7NN", "proofs": [ "43WhbUZ7rQQ397v6VmgQPjakJ3TPr4cCDhxAa1UmBMJgbDMeNabhFXvuMiFjVtvtWTtGK4rxFJ9UxACXYYywqbYL" ], "script": "base64:BgIQCAISBAoCCAgSBAoCCAgSAAwABmFkbWluMQIsQmd4cENtNHd4Ylc4U0tMUEtabmY0S1UyRDZaVTI5b3Y4TWdacmthU0FxcFkABmFkbWluMgIAABZrZXlfZmFybU5mdF9uZXh0TnVtYmVyAhJmYXJtTmZ0X25leHROdW1iZXIADGZhcm1OZnRfbmFtZQITQXNzb3RpYXRlZCBGYXJtIE5GVAALY293TmZ0X25hbWUCEkFzc290aWF0ZWQgQ293IE5GVAATZmFybU5mdF9kZXNjcmlwdGlvbgILeyJpbWFnZSI6ICIABGxpdmUCBkFDVElWRQAEZGVhZAIISU5BQ1RJVkUABmZhdHRlbgIGRkFUVEVOAQ10cnlHZXRJbnRlZ2VyAQNrZXkEByRtYXRjaDAJAJoIAgUEdGhpcwUDa2V5AwkAAQIFByRtYXRjaDACA0ludAQBYgUHJG1hdGNoMAUBYgAAAQx0cnlHZXRTdHJpbmcBA2tleQQHJG1hdGNoMAkAnQgCBQR0aGlzBQNrZXkDCQABAgUHJG1hdGNoMAIGU3RyaW5nBAFhBQckbWF0Y2gwBQFhAgABBWFsbG93AQ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IgQFaXNzdWUJAMIIBQULY293TmZ0X25hbWUJAKwCAgkArAICBQtkZXNjcmlwdGlvbgUJaW1hZ2VMaW5rAgIifQABAAAHBAJpZAkAuAgBBQVpc3N1ZQkAzAgCBQVpc3N1ZQkAzAgCCQEOU2NyaXB0VHJhbnNmZXIDBQlyZWNpcGllbnQAAQUCaWQJAMwIAgkBC1N0cmluZ0VudHJ5AgkArAICCQCsAgIJAKwCAgkArAICAgVmYXJtXwUHYWRkcmVzcwIFX2Nvd18JANgEAQUCaWQCB19zdGF0dXMFBGxpdmUJAMwIAgkBC1N0cmluZ0VudHJ5AgkArAICCQCsAgICBGNvd18JANgEAQUCaWQCBl9vd25lcgUHYWRkcmVzcwUDbmlsCQACAQISTm90IGFsbG93ZWQgY2FsbGVyAWkBBGluaXQACQDMCAIJAQxJbnRlZ2VyRW50cnkCBRZrZXlfZmFybU5mdF9uZXh0TnVtYmVyAAEFA25pbAAT1otL", "height": 2503253, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 8DGoGJDjgqvtwMUNPmPy7eR26z7yCfMqYgSHrm7NcL64 Next: 135K9ZiYhhk59Rkwg7wX9jTGoNVriargs7eHcxUtkw7y Full:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | - | let a = | |
4 | + | let a = "BgxpCm4wxbW8SKLPKZnf4KU2D6ZU29ov8MgZrkaSAqpY" | |
5 | 5 | ||
6 | - | @Callable(b) | |
7 | - | func abc () = { | |
8 | - | let c = invoke(addressFromPublicKey(a), "pay_tax", nil, [AttachedPayment(fromBase58String("AFQS5E4ELtxex3iANtWtUU2V2oWJZSo8VVnK8z3VFmqf"), 444)]) | |
9 | - | if ((c == c)) | |
10 | - | then nil | |
11 | - | else throw("Strict value is not equal to itself.") | |
6 | + | let b = "" | |
7 | + | ||
8 | + | let c = "farmNft_nextNumber" | |
9 | + | ||
10 | + | let d = "Assotiated Farm NFT" | |
11 | + | ||
12 | + | let e = "Assotiated Cow NFT" | |
13 | + | ||
14 | + | let f = "{\"image\": \"" | |
15 | + | ||
16 | + | let g = "ACTIVE" | |
17 | + | ||
18 | + | let h = "INACTIVE" | |
19 | + | ||
20 | + | let i = "FATTEN" | |
21 | + | ||
22 | + | func j (k) = { | |
23 | + | let l = getInteger(this, k) | |
24 | + | if ($isInstanceOf(l, "Int")) | |
25 | + | then { | |
26 | + | let m = l | |
27 | + | m | |
28 | + | } | |
29 | + | else 0 | |
12 | 30 | } | |
31 | + | ||
32 | + | ||
33 | + | func n (k) = { | |
34 | + | let l = getString(this, k) | |
35 | + | if ($isInstanceOf(l, "String")) | |
36 | + | then { | |
37 | + | let o = l | |
38 | + | o | |
39 | + | } | |
40 | + | else "" | |
41 | + | } | |
42 | + | ||
43 | + | ||
44 | + | func p (q) = if (if ((q == a)) | |
45 | + | then true | |
46 | + | else (q == b)) | |
47 | + | then true | |
48 | + | else false | |
49 | + | ||
50 | + | ||
51 | + | @Callable(r) | |
52 | + | func registerFarm (s,t) = { | |
53 | + | let q = toBase58String(r.callerPublicKey) | |
54 | + | if (p(q)) | |
55 | + | then { | |
56 | + | let u = addressFromStringValue(s) | |
57 | + | let v = split_4C(t, "|") | |
58 | + | let w = $Tuple3(v[0], v[1], v[2]) | |
59 | + | let x = w._1 | |
60 | + | let y = w._2 | |
61 | + | let z = w._3 | |
62 | + | let A = j(c) | |
63 | + | if ((A == A)) | |
64 | + | then { | |
65 | + | let B = Issue((d + toString(A)), ((f + z) + "\"}"), 1, 0, false) | |
66 | + | let C = calculateAssetId(B) | |
67 | + | [B, ScriptTransfer(u, 1, C), IntegerEntry(c, (A + 1)), StringEntry((("farm_" + s) + "_name"), x), StringEntry((("farm_" + s) + "_location"), y)] | |
68 | + | } | |
69 | + | else throw("Strict value is not equal to itself.") | |
70 | + | } | |
71 | + | else throw("Not allowed caller") | |
72 | + | } | |
73 | + | ||
74 | + | ||
75 | + | ||
76 | + | @Callable(r) | |
77 | + | func registerCow (s,t) = { | |
78 | + | let q = toBase58String(r.callerPublicKey) | |
79 | + | if (p(q)) | |
80 | + | then { | |
81 | + | let u = addressFromStringValue(s) | |
82 | + | let v = split_4C(t, t) | |
83 | + | let D = $Tuple7(v[0], v[1], v[2], v[3], v[4], v[5], v[6]) | |
84 | + | let E = D._1 | |
85 | + | let F = D._2 | |
86 | + | let G = D._3 | |
87 | + | let H = D._4 | |
88 | + | let I = D._5 | |
89 | + | let J = D._6 | |
90 | + | let z = D._7 | |
91 | + | let K = (((((((((((((("{\"cowCode\": \"" + E) + "\", \"bornedFarmAddress\": \"") + F) + "\", \"genes\": \"") + G) + "\", \"motherId\": \"") + H) + "\", \"fatherId\": \"") + I) + "\", \"type\": \"") + J) + "\", \"imageLink\": \"") + z) + "\"") | |
92 | + | let B = Issue(e, ((K + z) + "\"}"), 1, 0, false) | |
93 | + | let C = calculateAssetId(B) | |
94 | + | [B, ScriptTransfer(u, 1, C), StringEntry((((("farm_" + s) + "_cow_") + toBase58String(C)) + "_status"), g), StringEntry((("cow_" + toBase58String(C)) + "_owner"), s)] | |
95 | + | } | |
96 | + | else throw("Not allowed caller") | |
97 | + | } | |
98 | + | ||
99 | + | ||
100 | + | ||
101 | + | @Callable(r) | |
102 | + | func init () = [IntegerEntry(c, 1)] | |
13 | 103 | ||
14 | 104 |
github/deemru/w8io/026f985 22.71 ms ◑