tx · 97jvZ2KG5rthzD4w6oKonTTm75CFscADpgyvmK72as3f 3NARWzNaChSw8Mpf8CZYavL4QWQvk3KUU8b: -0.01400000 Waves 2019.08.20 00:30 [638590] smart account 3NARWzNaChSw8Mpf8CZYavL4QWQvk3KUU8b > SELF 0.00000000 Waves
{ "type": 13, "id": "97jvZ2KG5rthzD4w6oKonTTm75CFscADpgyvmK72as3f", "fee": 1400000, "feeAssetId": null, "timestamp": 1566250203744, "version": 1, "sender": "3NARWzNaChSw8Mpf8CZYavL4QWQvk3KUU8b", "senderPublicKey": "848RkjzRcJfyWuhGbq8NUFoLMpeDW8NbKu36H3SouHzF", "proofs": [ "5UC9FSPS1hXpyceLmE5PeBK28XZ7QAMGvwvg977hXB4SQQXVeScjB8T5AgY3rdXYaAiygnHCinfTTDX7banzTmFg" ], "script": "base64:AAIDAAAAAAAAAAAAAAAFAAAAAAp3YXZlc1Rva2VuBQAAAAR1bml0AQAAAAlwYXltZW50T2YAAAABAAAAA2tleQkAASwAAAACAgAAAAtwYXltZW50X29mXwUAAAADa2V5AQAAAAhzdGF0dXNPZgAAAAEAAAADa2V5CQABLAAAAAICAAAACnN0YXR1c19vZl8FAAAAA2tleQAAAAAFb3duZXIJAQAAAAdBZGRyZXNzAAAAAQEAAAAaAVTg86BxmqbXn0VCYdClvCRxLh2SvKgdo1wBAAAAEGlzUGF5bWVudFBlbmRpbmcAAAABAAAAA2tleQQAAAAHJG1hdGNoMAkABB0AAAACBQAAAAR0aGlzCQEAAAAIc3RhdHVzT2YAAAABBQAAAANrZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAABlN0cmluZwQAAAABcwUAAAAHJG1hdGNoMAkAAAAAAAACBQAAAAFzAgAAAAdwZW5kaW5nBwAAAAQAAAABaQEAAAAQc2V0V2FpdFRvUGF5bWVudAAAAAIAAAADa2V5AAAAB3BheW1lbnQJAQAAAAhXcml0ZVNldAAAAAEJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAQAAAAh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YzUa1XsTrv1uTjeBJa3SCHfA394pEuhvJPrkfybqyfQ Diff:
Old | New | Differences | |
---|---|---|---|
56 | 56 | ||
57 | 57 | ||
58 | 58 | @Callable(i) | |
59 | - | func transfer (m | |
59 | + | func transfer (m) = { | |
60 | 60 | let g = i.payment | |
61 | 61 | if ($isInstanceOf(g, "AttachedPayment")) | |
62 | 62 | then { | |
67 | 67 | if ($isInstanceOf(n, "Address")) | |
68 | 68 | then { | |
69 | 69 | let o = n | |
70 | - | TransferSet([ScriptTransfer(o, | |
70 | + | TransferSet([ScriptTransfer(o, k.amount, a)]) | |
71 | 71 | } | |
72 | 72 | else throw("invalin address") | |
73 | 73 | } |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 3 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = unit | |
5 | 5 | ||
6 | 6 | func b (c) = ("payment_of_" + c) | |
7 | 7 | ||
8 | 8 | ||
9 | 9 | func d (c) = ("status_of_" + c) | |
10 | 10 | ||
11 | 11 | ||
12 | 12 | let e = Address(base58'3NARWzNaChSw8Mpf8CZYavL4QWQvk3KUU8b') | |
13 | 13 | ||
14 | 14 | func f (c) = { | |
15 | 15 | let g = getString(this, d(c)) | |
16 | 16 | if ($isInstanceOf(g, "String")) | |
17 | 17 | then { | |
18 | 18 | let h = g | |
19 | 19 | (h == "pending") | |
20 | 20 | } | |
21 | 21 | else false | |
22 | 22 | } | |
23 | 23 | ||
24 | 24 | ||
25 | 25 | @Callable(i) | |
26 | 26 | func setWaitToPayment (c,j) = WriteSet([DataEntry(d(c), "pending"), DataEntry(b(c), j)]) | |
27 | 27 | ||
28 | 28 | ||
29 | 29 | ||
30 | 30 | @Callable(i) | |
31 | 31 | func pay (c) = if (f(c)) | |
32 | 32 | then { | |
33 | 33 | let g = i.payment | |
34 | 34 | if ($isInstanceOf(g, "AttachedPayment")) | |
35 | 35 | then { | |
36 | 36 | let k = g | |
37 | 37 | if ((k.assetId == a)) | |
38 | 38 | then { | |
39 | 39 | let l = WriteSet([DataEntry(d(c), "paid")]) | |
40 | 40 | let j = extract(getInteger(this, b(c))) | |
41 | 41 | ScriptResult(l, TransferSet([ScriptTransfer(e, j, a)])) | |
42 | 42 | } | |
43 | 43 | else throw(("can only WAVES, but got " + toBase58String(value(k.assetId)))) | |
44 | 44 | } | |
45 | 45 | else throw("payment in assetTokens must be attached") | |
46 | 46 | } | |
47 | 47 | else throw("Order already has been payed or rejected") | |
48 | 48 | ||
49 | 49 | ||
50 | 50 | ||
51 | 51 | @Callable(i) | |
52 | 52 | func reject (c) = if (f(c)) | |
53 | 53 | then WriteSet([DataEntry(d(c), "rejected")]) | |
54 | 54 | else throw("Order already has been payed or rejected") | |
55 | 55 | ||
56 | 56 | ||
57 | 57 | ||
58 | 58 | @Callable(i) | |
59 | - | func transfer (m | |
59 | + | func transfer (m) = { | |
60 | 60 | let g = i.payment | |
61 | 61 | if ($isInstanceOf(g, "AttachedPayment")) | |
62 | 62 | then { | |
63 | 63 | let k = g | |
64 | 64 | if ((k.assetId == a)) | |
65 | 65 | then { | |
66 | 66 | let n = addressFromString(m) | |
67 | 67 | if ($isInstanceOf(n, "Address")) | |
68 | 68 | then { | |
69 | 69 | let o = n | |
70 | - | TransferSet([ScriptTransfer(o, | |
70 | + | TransferSet([ScriptTransfer(o, k.amount, a)]) | |
71 | 71 | } | |
72 | 72 | else throw("invalin address") | |
73 | 73 | } | |
74 | 74 | else throw(("can only WAVES, but got " + toBase58String(value(k.assetId)))) | |
75 | 75 | } | |
76 | 76 | else throw("payment in assetTokens must be attached") | |
77 | 77 | } | |
78 | 78 | ||
79 | 79 |
github/deemru/w8io/026f985 22.46 ms ◑