tx · 5aANPEHYvxFLdAVJAogYEXigCk6sxicSTYqATCVCmmLp
3MpRDrT92zK6yWJh47UdA8mRDH7f2F3CSzH: -0.01000000 Waves
2021.09.05 13:49 [1689639] smart account 3MpRDrT92zK6yWJh47UdA8mRDH7f2F3CSzH > SELF 0.00000000 Waves
{
"type": 13,
"id": "5aANPEHYvxFLdAVJAogYEXigCk6sxicSTYqATCVCmmLp",
"fee": 1000000,
"feeAssetId": null,
"timestamp": 1630838994507,
"version": 2,
"chainId": 84,
"sender": "3MpRDrT92zK6yWJh47UdA8mRDH7f2F3CSzH",
"senderPublicKey": "6it1s6XyHkFTbzgCJPXSeHjyLYixDHy6hJgzzfbntDGB",
"proofs": [
"5DcXDdJssP8G2DajqhbSRbkiK8DTQhhpThcPJgzZta9Un2dxy97LP5rk8e7g3orPoZRZkyYfs5eHVa8BLVUnP9QE"
],
"script": "base64:AAIFAAAAAAAAAAcIAhIDCgEIAAAAAgAAAAAGbWRzdGlkAQAAACAGLtZERQwp0mc9GkII6TL8MrO9FCVbUZ4Q1IdRUGKaigEAAAALaXNQYXltZW50T2sAAAABAAAAAWkDCQAAAAAAAAIJAAGQAAAAAQgFAAAAAWkAAAAIcGF5bWVudHMAAAAAAAAAAAAJAAACAAAAAQIAAAAUUGF5bWVudCBub3QgYXR0YWNoZWQEAAAAAXAJAAGRAAAAAggFAAAAAWkAAAAIcGF5bWVudHMAAAAAAAAAAAAEAAAAByRtYXRjaDAIBQAAAAFwAAAAB2Fzc2V0SWQJAABnAAAAAggFAAAAAXAAAAAGYW1vdW50AAAAAAAF9eEAAAAAAQAAAAFpAQAAAAdidXltZHN0AAAAAQAAAAl0aGVTdHJpbmcDCQEAAAALaXNQYXltZW50T2sAAAABBQAAAAFpBAAAAAJwcAkAAZEAAAACCAUAAAABaQAAAAhwYXltZW50cwAAAAAAAAAAAAQAAAAEYW1udAgFAAAAAnBwAAAABmFtb3VudAQAAAAKbWRzdGFtb3VudAkAAGkAAAACCQAAaAAAAAIFAAAABGFtbnQAAAAAAAAAE4gAAAAAAAX14QAJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwgFAAAAAWkAAAAGY2FsbGVyBQAAAAptZHN0YW1vdW50BQAAAAZtZHN0aWQFAAAAA25pbAkAAAIAAAABAgAAAB1Xcm9uZyBwYXltZW50IGFtb3VudCBvciBhc3NldAAAAACY/hOg",
"height": 1689639,
"applicationStatus": "succeeded",
"spentComplexity": 0
}
View: original | compacted
Prev: 4MJdsLdueGd5os3MEKgz7ewoKuYUSeMBqwLc5HaQmLYt
Next: EMz37TNF4W8Rb9wH2PH6yXpZBTqgErTwiVGyJLr5MrwE
Diff:
Old | New | | Differences |
---|
19 | 19 | | then { |
---|
20 | 20 | | let pp = i.payments[0] |
---|
21 | 21 | | let amnt = pp.amount |
---|
22 | | - | let mdstamount = (amnt * 5000) |
---|
| 22 | + | let mdstamount = ((amnt * 5000) / 100000000) |
---|
23 | 23 | | [ScriptTransfer(i.caller, mdstamount, mdstid)] |
---|
24 | 24 | | } |
---|
25 | 25 | | else throw("Wrong payment amount or asset") |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 5 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | 4 | | let mdstid = base58'R8sQUmwwAENBL6B5ejGztDh3RzJ3MbKRqK7GtspFxKT' |
---|
5 | 5 | | |
---|
6 | 6 | | func isPaymentOk (i) = if ((size(i.payments) == 0)) |
---|
7 | 7 | | then throw("Payment not attached") |
---|
8 | 8 | | else { |
---|
9 | 9 | | let p = i.payments[0] |
---|
10 | 10 | | match p.assetId { |
---|
11 | 11 | | case _ => |
---|
12 | 12 | | (p.amount >= 100000000) |
---|
13 | 13 | | } |
---|
14 | 14 | | } |
---|
15 | 15 | | |
---|
16 | 16 | | |
---|
17 | 17 | | @Callable(i) |
---|
18 | 18 | | func buymdst (theString) = if (isPaymentOk(i)) |
---|
19 | 19 | | then { |
---|
20 | 20 | | let pp = i.payments[0] |
---|
21 | 21 | | let amnt = pp.amount |
---|
22 | | - | let mdstamount = (amnt * 5000) |
---|
| 22 | + | let mdstamount = ((amnt * 5000) / 100000000) |
---|
23 | 23 | | [ScriptTransfer(i.caller, mdstamount, mdstid)] |
---|
24 | 24 | | } |
---|
25 | 25 | | else throw("Wrong payment amount or asset") |
---|
26 | 26 | | |
---|
27 | 27 | | |
---|