tx · 3rwubdqL6j7gaQgkV1CDCT8bHBmJ9Nn6TE8uDk3Kdii5
3MpRDrT92zK6yWJh47UdA8mRDH7f2F3CSzH: -0.01400000 Waves
2021.05.17 02:03 [1528871] smart account 3MpRDrT92zK6yWJh47UdA8mRDH7f2F3CSzH > SELF 0.00000000 Waves
{
"type": 13,
"id": "3rwubdqL6j7gaQgkV1CDCT8bHBmJ9Nn6TE8uDk3Kdii5",
"fee": 1400000,
"feeAssetId": null,
"timestamp": 1621206250033,
"version": 2,
"chainId": 84,
"sender": "3MpRDrT92zK6yWJh47UdA8mRDH7f2F3CSzH",
"senderPublicKey": "6it1s6XyHkFTbzgCJPXSeHjyLYixDHy6hJgzzfbntDGB",
"proofs": [
"4uz6H6X1EP1AcQHnH9QwpRRb366dhNGBsL2HWW1EqLL4cURwS56kYyNzxAt7v56SdEZxnbPsnFQrcap62gNTvqzP"
],
"script": "base64:AAIEAAAAAAAAAAcIAhIDCgEIAAAABAAAAAAGbWlkaUlkAQAAACAGLtZERQwp0mc9GkII6TL8MrO9FCVbUZ4Q1IdRUGKaigAAAAAEZGF0ZQgFAAAACWxhc3RCbG9jawAAAAl0aW1lc3RhbXAAAAAABmFtTWlkaQAAAAAAAAAAAAEAAAALaXNQYXltZW50T2sAAAABAAAAAWkDCQAAAAAAAAIJAAGQAAAAAQgFAAAAAWkAAAAIcGF5bWVudHMAAAAAAAAAAAAJAAACAAAAAQIAAAAUUGF5bWVudCBub3QgYXR0YWNoZWQEAAAAAXAJAAGRAAAAAggFAAAAAWkAAAAIcGF5bWVudHMAAAAAAAAAAAAEAAAAByRtYXRjaDAIBQAAAAFwAAAAB2Fzc2V0SWQJAABnAAAAAgAAABtI61fgAAgFAAAAAXAAAAAGYW1vdW50AAAAAQAAAAFpAQAAAAdidXltaWRpAAAAAQAAAAR3aGF0AwkBAAAAC2lzUGF5bWVudE9rAAAAAQUAAAABaQQAAAACcHAJAAGRAAAAAggFAAAAAWkAAAAIcGF5bWVudHMAAAAAAAAAAAAEAAAABGFtbnQIBQAAAAJwcAAAAAZhbW91bnQEAAAACGVsQW1vdW50CQAAaAAAAAIJAABpAAAAAgUAAAAEYW1udAAAAAAAAAAnEAAAAAAAAAAXcAkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADCAUAAAABaQAAAAZjYWxsZXIFAAAACGVsQW1vdW50BQAAAAZtaWRpSWQFAAAAA25pbAkAAAIAAAABAgAAAB1Xcm9uZyBwYXltZW50IGFtb3VudCBvciBhc3NldAAAAACzCEZc",
"height": 1528871,
"applicationStatus": "succeeded",
"spentComplexity": 0
}
View: original | compacted
Prev: GgDHAPCZoXsvyNpmrh134vJ3UwJ3ZrAJnNdPwuT6o6pp
Next: 7y8oygm4SyCDPPX3mt1SmbA2fMejRyx3cQE2dGr991tR
Diff:
Old | New | | Differences |
---|
23 | 23 | | then { |
---|
24 | 24 | | let pp = i.payments[0] |
---|
25 | 25 | | let amnt = pp.amount |
---|
26 | | - | let elAmount = ((amnt / 100000000) * 6000) |
---|
| 26 | + | let elAmount = ((amnt / 10000) * 6000) |
---|
27 | 27 | | [ScriptTransfer(i.caller, elAmount, midiId)] |
---|
28 | 28 | | } |
---|
29 | 29 | | else throw("Wrong payment amount or asset") |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 4 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | 4 | | let midiId = base58'R8sQUmwwAENBL6B5ejGztDh3RzJ3MbKRqK7GtspFxKT' |
---|
5 | 5 | | |
---|
6 | 6 | | let date = lastBlock.timestamp |
---|
7 | 7 | | |
---|
8 | 8 | | let amMidi = 0 |
---|
9 | 9 | | |
---|
10 | 10 | | func isPaymentOk (i) = if ((size(i.payments) == 0)) |
---|
11 | 11 | | then throw("Payment not attached") |
---|
12 | 12 | | else { |
---|
13 | 13 | | let p = i.payments[0] |
---|
14 | 14 | | match p.assetId { |
---|
15 | 15 | | case _ => |
---|
16 | 16 | | (30000000000000 >= p.amount) |
---|
17 | 17 | | } |
---|
18 | 18 | | } |
---|
19 | 19 | | |
---|
20 | 20 | | |
---|
21 | 21 | | @Callable(i) |
---|
22 | 22 | | func buymidi (what) = if (isPaymentOk(i)) |
---|
23 | 23 | | then { |
---|
24 | 24 | | let pp = i.payments[0] |
---|
25 | 25 | | let amnt = pp.amount |
---|
26 | | - | let elAmount = ((amnt / 100000000) * 6000) |
---|
| 26 | + | let elAmount = ((amnt / 10000) * 6000) |
---|
27 | 27 | | [ScriptTransfer(i.caller, elAmount, midiId)] |
---|
28 | 28 | | } |
---|
29 | 29 | | else throw("Wrong payment amount or asset") |
---|
30 | 30 | | |
---|
31 | 31 | | |
---|