tx · CrRyWGZ4hqHxqYUK6emMFeaAFPyn3NQASaU9nixngxds

3NCCJWh4gk9p2FssfGtuHEQgbcBiEJNwfpY:  -0.14000000 Waves

2021.10.28 15:33 [1766147] smart account 3NCCJWh4gk9p2FssfGtuHEQgbcBiEJNwfpY > SELF 0.00000000 Waves

{ "type": 13, "id": "CrRyWGZ4hqHxqYUK6emMFeaAFPyn3NQASaU9nixngxds", "fee": 14000000, "feeAssetId": null, "timestamp": 1635424409726, "version": 2, "chainId": 84, "sender": "3NCCJWh4gk9p2FssfGtuHEQgbcBiEJNwfpY", "senderPublicKey": "6uCSnTeNsFiTBE6u6npUmFezFkve5M54EgMVmfEEZ4Yn", "proofs": [ "125SsZwcFkMk7komfwg5ZqePDLkRD8mMk7sQEau9eRLZdtkiS9yGwnpXp6yczwi7b2L6NP9JorAKjxu8GZ5ZAE6i", "3DMte56o3oxkYPvBjFeHKZevcay5rGa3ktEwzVDm6zWty11PJUNvCk7AoWw8iT9NDQfHdPScqamm5CKwiM23pk4x" ], "script": "base64:AAIFAAAAAAAAAAYIAhIAEgAAAAAMAAAAABhrZXlVc2VyRU5OT0NsYWltZWRBbW91bnQCAAAAFF9FTk5PX2NsYWltZWRfYW1vdW50AAAAABxrZXlVc2VyRU5OT0xhc3RDbGFpbWVkQW1vdW50AgAAABlfRU5OT19sYXN0X2NsYWltZWRfYW1vdW50AAAAABFrZXlVc2VyRU5OT0xvY2tlZAIAAAAMX0VOTk9fYW1vdW50AAAAABRrZXlVc2VyRU5OT0xvY2tlZFRhZwIAAAAGc2hhcmVfAAAAAAxhZG1pblB1YktleTEBAAAAIFepk7yEupOYL1euYnjVKBoA6QMFEEnH/ZuMJcQl4MoPAAAAAAxhZG1pblB1YktleTIBAAAAIFepk7yEupOYL1euYnjVKBoA6QMFEEnH/ZuMJcQl4MoPAAAAAAxhZG1pblB1YktleTMBAAAAIFepk7yEupOYL1euYnjVKBoA6QMFEEnH/ZuMJcQl4MoPAAAAAAlzaGFyZURhdGEB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AAZAAAAAIFAAAAEmFkbWluUHViS2V5MVNpZ25lZAUAAAASYWRtaW5QdWJLZXkyU2lnbmVkBQAAABJhZG1pblB1YktleTNTaWduZWQAAAAAAAAAAALoXbpf", "height": 1766147, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: GNtVjSt67gVcm2RELBRsX1cMLX5ZLj24uhYwKxfimZ9f Next: 2pc9QseAtA4QeJwqnGZxENGs8PwB41BoVxgb3bSLVeMR Diff:
OldNewDifferences
4848
4949
5050 func getClaimedAmount (caller) = {
51- let callerWithdrawn = getInteger(this, (toString(caller) + keyUserENNOClaimedAmount))
51+ let callerWithdrawn = getInteger(stakeDApp, (toString(caller) + keyUserENNOClaimedAmount))
5252 let callerWithdrawnAmount = match callerWithdrawn {
5353 case share: Int =>
5454 share
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let keyUserENNOClaimedAmount = "_ENNO_claimed_amount"
55
66 let keyUserENNOLastClaimedAmount = "_ENNO_last_claimed_amount"
77
88 let keyUserENNOLocked = "_ENNO_amount"
99
1010 let keyUserENNOLockedTag = "share_"
1111
1212 let adminPubKey1 = base58'6uCSnTeNsFiTBE6u6npUmFezFkve5M54EgMVmfEEZ4Yn'
1313
1414 let adminPubKey2 = base58'6uCSnTeNsFiTBE6u6npUmFezFkve5M54EgMVmfEEZ4Yn'
1515
1616 let adminPubKey3 = base58'6uCSnTeNsFiTBE6u6npUmFezFkve5M54EgMVmfEEZ4Yn'
1717
1818 let shareData = base58'79G9MRTWPsir5gThDeuicpBuQxx8UFNqVaDUYcRfWtPA'
1919
2020 let stakeDApp = addressFromPublicKey(base58'Ese6jz6mtrhgwJWdXbAxHNHg2qzae5D2xXWuVF7tLfs8')
2121
2222 func getCallerShare (caller) = {
2323 let callerShare = getInteger(addressFromPublicKey(shareData), (keyUserENNOLockedTag + toString(caller)))
2424 let callerShareAmount = match callerShare {
2525 case share: Int =>
2626 share
2727 case share: Unit =>
2828 throw("Only governance qualifiers can call this function.")
2929 case _ =>
3030 throw("Match error")
3131 }
3232 callerShareAmount
3333 }
3434
3535
3636 func getCallerLock (caller) = {
3737 let callerShare = getInteger(stakeDApp, (toString(caller) + keyUserENNOLocked))
3838 let callerShareAmount = match callerShare {
3939 case share: Int =>
4040 share
4141 case share: Unit =>
4242 throw("Only governance qualifiers can call this function.")
4343 case _ =>
4444 throw("Match error")
4545 }
4646 callerShareAmount
4747 }
4848
4949
5050 func getClaimedAmount (caller) = {
51- let callerWithdrawn = getInteger(this, (toString(caller) + keyUserENNOClaimedAmount))
51+ let callerWithdrawn = getInteger(stakeDApp, (toString(caller) + keyUserENNOClaimedAmount))
5252 let callerWithdrawnAmount = match callerWithdrawn {
5353 case share: Int =>
5454 share
5555 case share: Unit =>
5656 0
5757 case _ =>
5858 throw("Match error")
5959 }
6060 callerWithdrawnAmount
6161 }
6262
6363
6464 @Callable(i)
6565 func claimAndWithdrawENNO () = {
6666 let userShare = getCallerShare(i.caller)
6767 let userClaimedAmount = getClaimedAmount(i.caller)
6868 let claimAmount = (userShare - userClaimedAmount)
6969 if ((0 >= claimAmount))
7070 then throw("Claim amount must be bigger than 0")
7171 else {
7272 let userClaimedAmountNew = (userClaimedAmount + claimAmount)
7373 let stake = invoke(stakeDApp, "claimAndWithdrawENNO", nil, nil)
7474 if ((stake == stake))
7575 then [IntegerEntry((toString(i.caller) + keyUserENNOClaimedAmount), userClaimedAmountNew), IntegerEntry((toString(i.caller) + keyUserENNOLastClaimedAmount), claimAmount)]
7676 else throw("Strict value is not equal to itself.")
7777 }
7878 }
7979
8080
8181
8282 @Callable(i)
8383 func claimAndStakeENNO () = {
8484 let userShare = getCallerShare(i.caller)
8585 let userClaimedAmount = getClaimedAmount(i.caller)
8686 let claimAmount = (userShare - userClaimedAmount)
8787 if ((0 >= claimAmount))
8888 then throw("Claim amount must be bigger than 0")
8989 else {
9090 let userClaimedAmountNew = (userClaimedAmount + claimAmount)
9191 let stake = invoke(stakeDApp, "claimAndStakeENNO", nil, nil)
9292 if ((stake == stake))
9393 then [IntegerEntry((toString(i.caller) + keyUserENNOClaimedAmount), userClaimedAmountNew), IntegerEntry((toString(i.caller) + keyUserENNOLastClaimedAmount), claimAmount)]
9494 else throw("Strict value is not equal to itself.")
9595 }
9696 }
9797
9898
9999 @Verifier(tx)
100100 func verify () = match tx {
101101 case _ =>
102102 let adminPubKey1Signed = if (sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey1))
103103 then 1
104104 else 0
105105 let adminPubKey2Signed = if (sigVerify(tx.bodyBytes, tx.proofs[1], adminPubKey2))
106106 then 1
107107 else 0
108108 let adminPubKey3Signed = if (sigVerify(tx.bodyBytes, tx.proofs[2], adminPubKey3))
109109 then 1
110110 else 0
111111 (((adminPubKey1Signed + adminPubKey2Signed) + adminPubKey3Signed) >= 2)
112112 }
113113

github/deemru/w8io/169f3d6 
28.60 ms