tx · CCYd258pt2aRF3K4VbwY7crYTms3FQuuBL9NukjtGcmJ 3N2xV35dmGG8EYfhNfdKBPBq2xoSKHkmYxf: -0.01000000 Waves 2022.05.17 14:36 [2055615] smart account 3N2xV35dmGG8EYfhNfdKBPBq2xoSKHkmYxf > SELF 0.00000000 Waves
{ "type": 13, "id": "CCYd258pt2aRF3K4VbwY7crYTms3FQuuBL9NukjtGcmJ", "fee": 1000000, "feeAssetId": null, "timestamp": 1652787427302, "version": 2, "chainId": 84, "sender": "3N2xV35dmGG8EYfhNfdKBPBq2xoSKHkmYxf", "senderPublicKey": "9F6gZRAntXCZwkaxqm21ELyF2oCxcX1947Aazo7nMLYG", "proofs": [ "4wXbYg7Tjs6xgogTN56r1vJy6ZZqydquv2NiTGnGNYLtBKu53Ju8Nq9hxaNjTjNMiny379mqbQ91nBrr8fhg883J" ], "script": "base64:AAIFAAAAAAAAAQ8IAhIAEgMKAQESAwoBARoSCgFhEg1QQVlNRU5UX0FTU0VUGhEKAWISDFJFV0FSRF9BU1NFVBoQCgFjEgtSRVdBUkRfUE9PTBoQCgFkEgtpc1BheW1lbnRPaxoGCgFlEgFpGhYKAWYSEWFjY2VwdGFibGVBc3NldElkGgYKAWcSAXAaDAoBaBIHJG1hdGNoMBoMCgFpEgdhc3NldElkGg8KAWoSCmN1cnJlbnRLZXkaCwoBaxIGd2FsbGV0Gg0KAWwSCGdldFNoYXJlGgoKAW0SBXRvdGFsGhIKAW4SDXBheW1lbnRBbW91bnQaEAoBbxILY2xhaW1BbW91bnQaEQoBcBIMUE9PTF9CQUxBTkNFAAAABAAAAAABYQEAAAAgLTcTgdMkN12f4W9209EPk+8sLPTdia1cSlbofMkBchsAAAAAAWIBAAAAIK2dSBaFkXln78NKeoaZ0d1Q6QVJPOT+QERHjOGDxML0AAAAAAFjCQEAAAAHQWRkcmVzcwAAAAEBAAAAGgFU7X9voqvlbe3yLTFcZGa96NUkfO3kvsCHAQAAAAFkAAAAAQAAAAFlBAAAAAFmBQA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zc2FnZQAAAAIJAAQaAAAAAgUAAAAEdGhpcwUAAAABawIAAAAQbm90aGluZyB0byBjbGFpbQQAAAABcAkBAAAAE3ZhbHVlT3JFcnJvck1lc3NhZ2UAAAACCQAD8AAAAAIFAAAAAWMFAAAAAWICAAAAFXJld2FyZCBwb29sIGlzIGVtcHR5IQkAAAIAAAABCQABpAAAAAEFAAAAAXAAAAAAr+1tmg==", "height": 2055615, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 5rb2oyX7byfWKfU4KY8QovjsF8erAcULgyVe4R4JzxyG Next: 7CwRLVhR9Q6EFgFrqxKve88pJS6FHDeFeZLvwnTAQ89F Diff:
Old | New | Differences | |
---|---|---|---|
5 | 5 | ||
6 | 6 | let REWARD_ASSET = base58'CgidgEMbCKXXErgJXVyZCFRaK8SBNA73Jg8mNXALtVKh' | |
7 | 7 | ||
8 | - | let REWARD_POOL = Address(base58' | |
8 | + | let REWARD_POOL = Address(base58'3NBZraoFBG4i6YVuAtcAwTEDwsfEcLh9bSv') | |
9 | 9 | ||
10 | 10 | func isPaymentOk (i) = { | |
11 | 11 | let acceptableAssetId = PAYMENT_ASSET |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let PAYMENT_ASSET = base58'43W4FcqA1rEpSmUGHoGiXvpSLfhadws9LS5j3SJsKxxS' | |
5 | 5 | ||
6 | 6 | let REWARD_ASSET = base58'CgidgEMbCKXXErgJXVyZCFRaK8SBNA73Jg8mNXALtVKh' | |
7 | 7 | ||
8 | - | let REWARD_POOL = Address(base58' | |
8 | + | let REWARD_POOL = Address(base58'3NBZraoFBG4i6YVuAtcAwTEDwsfEcLh9bSv') | |
9 | 9 | ||
10 | 10 | func isPaymentOk (i) = { | |
11 | 11 | let acceptableAssetId = PAYMENT_ASSET | |
12 | 12 | if ((size(i.payments) == 0)) | |
13 | 13 | then throw("Payment not attached") | |
14 | 14 | else { | |
15 | 15 | let p = i.payments[0] | |
16 | 16 | match p.assetId { | |
17 | 17 | case assetId: ByteVector => | |
18 | 18 | if ((assetId == acceptableAssetId)) | |
19 | 19 | then (p.amount == 100000) | |
20 | 20 | else false | |
21 | 21 | case _ => | |
22 | 22 | throw("Wrong payment asset or min amount 0.0001") | |
23 | 23 | } | |
24 | 24 | } | |
25 | 25 | } | |
26 | 26 | ||
27 | 27 | ||
28 | 28 | @Callable(i) | |
29 | 29 | func stakePixels () = { | |
30 | 30 | let currentKey = toBase58String(i.caller.bytes) | |
31 | 31 | if (isPaymentOk(i)) | |
32 | 32 | then { | |
33 | 33 | let wallet = (currentKey + "_share") | |
34 | 34 | let getShare = valueOrElse(getInteger(this, wallet), 0) | |
35 | 35 | let total = (getShare + i.payments[0].amount) | |
36 | 36 | [IntegerEntry(wallet, total)] | |
37 | 37 | } | |
38 | 38 | else throw("Wrong payment amount or asset") | |
39 | 39 | } | |
40 | 40 | ||
41 | 41 | ||
42 | 42 | ||
43 | 43 | @Callable(i) | |
44 | 44 | func withdrawPixels (paymentAmount) = throw("withdrawl") | |
45 | 45 | ||
46 | 46 | ||
47 | 47 | ||
48 | 48 | @Callable(i) | |
49 | 49 | func claim (claimAmount) = { | |
50 | 50 | let currentKey = toBase58String(i.caller.bytes) | |
51 | 51 | let wallet = (currentKey + "_share") | |
52 | 52 | let getShare = valueOrErrorMessage(getInteger(this, wallet), "nothing to claim") | |
53 | 53 | let POOL_BALANCE = valueOrErrorMessage(assetBalance(REWARD_POOL, REWARD_ASSET), "reward pool is empty!") | |
54 | 54 | throw(toString(POOL_BALANCE)) | |
55 | 55 | } | |
56 | 56 | ||
57 | 57 |
github/deemru/w8io/169f3d6 28.96 ms ◑