1 | | - | {-# STDLIB_VERSION 5 #-} |
---|
2 | | - | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | | - | {-# CONTENT_TYPE DAPP #-} |
---|
4 | | - | |
---|
5 | | - | |
---|
6 | | - | @Callable(a) |
---|
7 | | - | func post_incoming_polygon_txn (b) = { |
---|
8 | | - | let c = split(b, "_") |
---|
9 | | - | let d = c[0] |
---|
10 | | - | let e = c[1] |
---|
11 | | - | let f = toBase16String(toBytes(e)) |
---|
12 | | - | let g = c[2] |
---|
13 | | - | let h = fraction(parseIntValue(g), 1, 10000000000) |
---|
14 | | - | let i = { |
---|
15 | | - | let j = getInteger(this, "Total_Incoming_Txns") |
---|
16 | | - | if ($isInstanceOf(j, "Int")) |
---|
17 | | - | then { |
---|
18 | | - | let k = j |
---|
19 | | - | k |
---|
20 | | - | } |
---|
21 | | - | else 0 |
---|
22 | | - | } |
---|
23 | | - | let l = (i + 1) |
---|
24 | | - | let m = { |
---|
25 | | - | let j = getInteger(this, "Total_Funds_Deposited") |
---|
26 | | - | if ($isInstanceOf(j, "Int")) |
---|
27 | | - | then { |
---|
28 | | - | let k = j |
---|
29 | | - | k |
---|
30 | | - | } |
---|
31 | | - | else 0 |
---|
32 | | - | } |
---|
33 | | - | let n = (m + h) |
---|
34 | | - | let o = { |
---|
35 | | - | let j = getInteger(this, e) |
---|
36 | | - | if ($isInstanceOf(j, "Int")) |
---|
37 | | - | then { |
---|
38 | | - | let k = j |
---|
39 | | - | k |
---|
40 | | - | } |
---|
41 | | - | else 0 |
---|
42 | | - | } |
---|
43 | | - | let p = (o + h) |
---|
44 | | - | let q = getString(this, ("Incoming_Txn_Hash_" + d)) |
---|
45 | | - | if ((q == d)) |
---|
46 | | - | then throw((d + " Already Exist and released by Dapp.")) |
---|
47 | | - | else [IntegerEntry("Total_Incoming_Txns", l), StringEntry(("Incoming_Txn_Hash_" + d), d), IntegerEntry("Total_Funds_Deposited", n), IntegerEntry(e, p), ScriptTransfer(addressFromStringValue(e), h, unit), StringEntry(f, e)] |
---|
48 | | - | } |
---|
49 | | - | |
---|
50 | | - | |
---|
51 | | - | |
---|
52 | | - | @Callable(a) |
---|
53 | | - | func Delete (r,s,t,u) = [DeleteEntry(r), DeleteEntry(s), DeleteEntry(t), DeleteEntry(u)] |
---|
54 | | - | |
---|
55 | | - | |
---|
| 1 | + | # no script |
---|