tx · DLQosY5kyzUsGX4LeAkcESVuG1sDZkghz9zgvD5sg7m3

3N4AZA12Pu3bVdPDCXb2isDK6VGXjH83E28:  -0.01000000 Waves

2022.06.16 14:57 [2098892] smart account 3N4AZA12Pu3bVdPDCXb2isDK6VGXjH83E28 > SELF 0.00000000 Waves

{ "type": 13, "id": "DLQosY5kyzUsGX4LeAkcESVuG1sDZkghz9zgvD5sg7m3", "fee": 1000000, "feeAssetId": null, "timestamp": 1655380641561, "version": 1, "sender": "3N4AZA12Pu3bVdPDCXb2isDK6VGXjH83E28", "senderPublicKey": "9QUDPBm53xuoZmAoYLZSAQYgtmxZXMEtcGNTTAz7BstA", "proofs": [ "4FzC4hUrok376j4Lzc7JwQ5wWjDqkaY2MfFmmfxiDJAkG2LyWdbcABd9db4WqRtoR4BDAHFoucWwjBJTABFPPWVG" ], "script": "base64:AAIFAAAAAAAAAAQIAhIAAAAABQAAAAALb3duZXJXYWxsZXQCAAAAIzNQNE50d2FoSFBzU3FhQWJQZTRSTFBmQnVkaGZCQ3RRVkdCAAAAAA5wcm90b2NvbFdhbGxldAIAAAAjM1BOZGM1ZjdYUk1OYzg2R0VwekFvWFVjc3ZhZ0MyVlFCQWsAAAAACW93bmVyUGVyYwAAAAAAAAMNQAAAAAAMcHJvdG9jb2xQZXJjAAAAAAAADDUAAAAAAAVNVUxUNgAAAAAAAA9CQAAAAAEAAAABaQEAAAARZGlzdHJpYnV0ZVByb2ZpdHMAAAAABAAAAAdiYWxhbmNlCQAD7wAAAAEFAAAABHRoaXMDCQAAZgAAAAIAAAAAAAAAAAAIBQAAAAdiYWxhbmNlAAAACWF2YWlsYWJsZQkAAAIAAAABAgAAABlObyBwYXltZW50cyB0byBkaXN0cmlidXRlBAAAAAtvd25lckFtb3VudAkAAGsAAAADCAUAAAAHYmFsYW5jZQAAAAlhdmFpbGFibGUFAAAACW93bmVyUGVyYwUAAAAFTVVMVDYEAAAADnByb3RvY29sQW1vdW50CQAAZQAAAAIIBQAAAAdiYWxhbmNlAAAACWF2YWlsYWJsZQUAAAALb3duZXJBbW91bnQJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwkBAAAAEUBleHRyTmF0aXZlKDEwNjIpAAAAAQUAAAALb3duZXJXYWxsZXQFAAAAC293bmVyQW1vdW50BQAAAAR1bml0CQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMJAQAAABFAZXh0ck5hdGl2ZSgxMDYyKQAAAAEFAAAADnByb3RvY29sV2FsbGV0BQAAAA5wcm90b2NvbEFtb3VudAUAAAAEdW5pdAUAAAADbmlsAAAAAMNbowc=", "chainId": 84, "height": 2098892, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: 9MUHcMLtqrrfcbr6h4sV8Zw9LkDqUhbKDNAy1SWqhEao Full:
OldNewDifferences
1-# no script
1+{-# STDLIB_VERSION 5 #-}
2+{-# SCRIPT_TYPE ACCOUNT #-}
3+{-# CONTENT_TYPE DAPP #-}
4+let ownerWallet = "3P4NtwahHPsSqaAbPe4RLPfBudhfBCtQVGB"
5+
6+let protocolWallet = "3PNdc5f7XRMNc86GEpzAoXUcsvagC2VQBAk"
7+
8+let ownerPerc = 200000
9+
10+let protocolPerc = 800000
11+
12+let MULT6 = 1000000
13+
14+@Callable(i)
15+func distributeProfits () = {
16+ let balance = wavesBalance(this)
17+ if ((0 > balance.available))
18+ then throw("No payments to distribute")
19+ else {
20+ let ownerAmount = fraction(balance.available, ownerPerc, MULT6)
21+ let protocolAmount = (balance.available - ownerAmount)
22+[ScriptTransfer(addressFromStringValue(ownerWallet), ownerAmount, unit), ScriptTransfer(addressFromStringValue(protocolWallet), protocolAmount, unit)]
23+ }
24+ }
25+
26+

github/deemru/w8io/026f985 
18.53 ms