tx · 2CqBRwhHoh2rb1bfPBp9BgTGUZZVAcfFMvg8STU3oC3s
3N9fd5Eo9BngWyUCzYRuBNhQvYTeqKzEH16: -0.04000000 Waves
2020.09.24 20:55 [1191712] smart account 3N9fd5Eo9BngWyUCzYRuBNhQvYTeqKzEH16 > SELF 0.00000000 Waves
{
"type": 13,
"id": "2CqBRwhHoh2rb1bfPBp9BgTGUZZVAcfFMvg8STU3oC3s",
"fee": 4000000,
"feeAssetId": null,
"timestamp": 1600970186785,
"version": 2,
"chainId": 84,
"sender": "3N9fd5Eo9BngWyUCzYRuBNhQvYTeqKzEH16",
"senderPublicKey": "5UwbcyHURH1J3EKpAxtCDuQMcEEhFqe6Hm5DXV5UMu7u",
"proofs": [
"388pEqsjPYec7u98eXDLPTLCh5yQvBEzahTNaiyt7dr6W8CZctuz63k2XdJ1QvsXdSkAivoiiZxxYg2pyYWWqpAj"
],
"script": "base64:AAIEAAAAAAAAAAQIAhIAAAAAAgAAAAALbXlwdWJsaWNrZXkBAAAAIEKXKZcWm8ZroWw2Cu6o7ASQ+/gPHWPgTLEAY1sJ+g0wAQAAABlnZXRBYndhc3Nlck1lbmdlSHlkcmF1bGlrAAAAAQAAAAlQdWJsaWNLZXkEAAAABHdlcnQEAAAAByRtYXRjaDAJAAQaAAAAAgUAAAAEdGhpcwkAASwAAAACBQAAAAlQdWJsaWNLZXkCAAAADF93YXNzZXJtZW5nZQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAADSW50BAAAAAFhBQAAAAckbWF0Y2gwBQAAAAFhAP//////////BQAAAAR3ZXJ0AAAAAQAAAAFpAQAAAAdhYmFzTmV1AAAAAAQAAAAJUHVibGljS2V5CQACWAAAAAEIBQAAAAFpAAAAD2NhbGxlclB1YmxpY0tleQQAAAAFbWVuZ2UJAQAAABlnZXRBYndhc3Nlck1lbmdlSHlkcmF1bGlrAAAAAQUAAAAJUHVibGljS2V5AwkAAGcAAAACBQAAAAVtZW5nZQAAAAAAAAAAAAkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgkAASwAAAACBQAAAAlQdWJsaWNLZXkCAAAAD19BQkFTX05ldV9NZW5nZQUAAAAFbWVuZ2UFAAAAA25pbAkAAAIAAAABAgAAABNNZW5nZSBnaWJ0IGVzIG5pY2h0AAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAQAAAAHJG1hdGNoMAUAAAACdHgDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAFFNldFNjcmlwdFRyYW5zYWN0aW9uBAAAAAJ0eAUAAAAHJG1hdGNoMAYJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAABQAAAAtteXB1YmxpY2tleX+qpkQ=",
"height": 1191712,
"applicationStatus": "succeeded",
"spentComplexity": 0
}
View: original | compacted
Prev: BQrtKotsWaGhURgWEwEs8DNndFczEwaaZLxeVi5MLCyV
Next: C33SRXSsp1ZZpCuMwp7kGdh8PrH8JEexC7kQZa4W9DoE
Diff:
Old | New | | Differences |
---|
4 | 4 | | let mypublickey = base58'5UwbcyHURH1J3EKpAxtCDuQMcEEhFqe6Hm5DXV5UMu7u' |
---|
5 | 5 | | |
---|
6 | 6 | | func getAbwasserMengeHydraulik (PublicKey) = { |
---|
7 | | - | let Wert = match getString(this, PublicKey) { |
---|
8 | | - | case a: String => |
---|
| 7 | + | let wert = match getInteger(this, (PublicKey + "_wassermenge")) { |
---|
| 8 | + | case a: Int => |
---|
9 | 9 | | a |
---|
10 | 10 | | case _ => |
---|
11 | | - | 0 |
---|
| 11 | + | -1 |
---|
12 | 12 | | } |
---|
13 | | - | true |
---|
| 13 | + | wert |
---|
14 | 14 | | } |
---|
15 | 15 | | |
---|
16 | 16 | | |
---|
17 | 17 | | @Callable(i) |
---|
18 | | - | func division (a,b) = { |
---|
19 | | - | let c = (((a * b) * 100) / 500) |
---|
20 | | - | let result = toString(c) |
---|
21 | | - | [StringEntry("new fraction :", result)] |
---|
22 | | - | } |
---|
23 | | - | |
---|
24 | | - | |
---|
25 | | - | |
---|
26 | | - | @Callable(i) |
---|
27 | | - | func getMyMessage () = { |
---|
28 | | - | let currentKey = (toBase58String(i.callerPublicKey) + "_test") |
---|
29 | | - | let msg = match getString(this, currentKey) { |
---|
30 | | - | case a: String => |
---|
31 | | - | a |
---|
32 | | - | case _ => |
---|
33 | | - | 0 |
---|
34 | | - | } |
---|
35 | | - | match msg { |
---|
36 | | - | case t: String => |
---|
37 | | - | [StringEntry("myMessage", ("reference is " + t))] |
---|
38 | | - | case _ => |
---|
39 | | - | [StringEntry("myMessage", ("none " + toBase58String(i.callerPublicKey)))] |
---|
40 | | - | } |
---|
| 18 | + | func abasNeu () = { |
---|
| 19 | + | let PublicKey = toBase58String(i.callerPublicKey) |
---|
| 20 | + | let menge = getAbwasserMengeHydraulik(PublicKey) |
---|
| 21 | + | if ((menge >= 0)) |
---|
| 22 | + | then [IntegerEntry((PublicKey + "_ABAS_Neu_Menge"), menge)] |
---|
| 23 | + | else throw("Menge gibt es nicht") |
---|
41 | 24 | | } |
---|
42 | 25 | | |
---|
43 | 26 | | |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 4 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | 4 | | let mypublickey = base58'5UwbcyHURH1J3EKpAxtCDuQMcEEhFqe6Hm5DXV5UMu7u' |
---|
5 | 5 | | |
---|
6 | 6 | | func getAbwasserMengeHydraulik (PublicKey) = { |
---|
7 | | - | let Wert = match getString(this, PublicKey) { |
---|
8 | | - | case a: String => |
---|
| 7 | + | let wert = match getInteger(this, (PublicKey + "_wassermenge")) { |
---|
| 8 | + | case a: Int => |
---|
9 | 9 | | a |
---|
10 | 10 | | case _ => |
---|
11 | | - | 0 |
---|
| 11 | + | -1 |
---|
12 | 12 | | } |
---|
13 | | - | true |
---|
| 13 | + | wert |
---|
14 | 14 | | } |
---|
15 | 15 | | |
---|
16 | 16 | | |
---|
17 | 17 | | @Callable(i) |
---|
18 | | - | func division (a,b) = { |
---|
19 | | - | let c = (((a * b) * 100) / 500) |
---|
20 | | - | let result = toString(c) |
---|
21 | | - | [StringEntry("new fraction :", result)] |
---|
22 | | - | } |
---|
23 | | - | |
---|
24 | | - | |
---|
25 | | - | |
---|
26 | | - | @Callable(i) |
---|
27 | | - | func getMyMessage () = { |
---|
28 | | - | let currentKey = (toBase58String(i.callerPublicKey) + "_test") |
---|
29 | | - | let msg = match getString(this, currentKey) { |
---|
30 | | - | case a: String => |
---|
31 | | - | a |
---|
32 | | - | case _ => |
---|
33 | | - | 0 |
---|
34 | | - | } |
---|
35 | | - | match msg { |
---|
36 | | - | case t: String => |
---|
37 | | - | [StringEntry("myMessage", ("reference is " + t))] |
---|
38 | | - | case _ => |
---|
39 | | - | [StringEntry("myMessage", ("none " + toBase58String(i.callerPublicKey)))] |
---|
40 | | - | } |
---|
| 18 | + | func abasNeu () = { |
---|
| 19 | + | let PublicKey = toBase58String(i.callerPublicKey) |
---|
| 20 | + | let menge = getAbwasserMengeHydraulik(PublicKey) |
---|
| 21 | + | if ((menge >= 0)) |
---|
| 22 | + | then [IntegerEntry((PublicKey + "_ABAS_Neu_Menge"), menge)] |
---|
| 23 | + | else throw("Menge gibt es nicht") |
---|
41 | 24 | | } |
---|
42 | 25 | | |
---|
43 | 26 | | |
---|
44 | 27 | | @Verifier(tx) |
---|
45 | 28 | | func verify () = match tx { |
---|
46 | 29 | | case tx: SetScriptTransaction => |
---|
47 | 30 | | true |
---|
48 | 31 | | case _ => |
---|
49 | 32 | | sigVerify(tx.bodyBytes, tx.proofs[0], mypublickey) |
---|
50 | 33 | | } |
---|
51 | 34 | | |
---|