tx · AwmD1VSDeLiiGkanKpCSH7z8Dk2tXBaFhA2VvYEUj9ed

3N2D6tJAXzcTDgUiTWmcdCHd6ctYwNENuBn:  -0.01000000 Waves

2022.11.01 14:59 [2298017] smart account 3N2D6tJAXzcTDgUiTWmcdCHd6ctYwNENuBn > SELF 0.00000000 Waves

{ "type": 13, "id": "AwmD1VSDeLiiGkanKpCSH7z8Dk2tXBaFhA2VvYEUj9ed", "fee": 1000000, "feeAssetId": null, "timestamp": 1667303997970, "version": 2, "chainId": 84, "sender": "3N2D6tJAXzcTDgUiTWmcdCHd6ctYwNENuBn", "senderPublicKey": "Cq4RbcVcQJpCWyHiACDqUf2PbU8PaX949Dun9wRSeDzE", "proofs": [ "53LEZmAo1QvPZ7kbxVho1BK7NM8nUAs5BqU8QCNbhMtBmc9ShSNgLNDJ6jpu2FmdMzXXafsMfxyTbPZYj5cpCf8K" ], "script": "base64:AAIFAAAAAAAAAA0IAhIECgIICBIDCgEIAAAACgAAAAAKbmZ0QXNzZXRJZAEAAAAAAAAAABBpbmN1YmF0b3JBZGRyZXNzAQAAAAAAAAAAC3VzZXJBZGRyZXNzAQAAAAAAAAAAF2NvbGxlY3RpdmVNYXN0ZXJBZGRyZXNzAQAAAAAAAAAABXJlZjIwCQAETAAAAAICAAAAAAUAAAADbmlsAQAAAA10cnlHZXRJbnRlZ2VyAAAAAQAAAANrZXkEAAAAByRtYXRjaDAJAAQaAAAAAgUAAAAEdGhpcwUAAAADa2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAANJbnQEAAAAAWIFAAAAByRtYXRjaDAFAAAAAWIAAAAAAAAAAAABAAAAE21hc3RlclRyeUdldEJvb2xlYW4AAAABAAAAA2tleQQAAAAHJG1hdGNoMAkABBsAAAACCQEAAAAHQWRkcmVzcwAAAAEFAAAAF2NvbGxlY3RpdmVNYXN0ZXJBZGRyZXNzBQAAAANrZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAB0Jvb2xlYW4EAAAAAWIF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AAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXlDNE+d", "height": 2298017, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 4oCboyW3iKd9zTC8rQ1LM8YrYjvKXiUMDdTPVih4hYb6 Next: 2w8iJnTuhU5C8iwpPVLCaxofMDUiDqZKYV9Fx67Gp5hV Diff:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-let eggsAssetId = base58'JCGDtrVy64cCJ1wCKfCaiNQMnyYwii71TbE5QeAHfxgF'
4+let nftAssetId = base58''
55
6-let incubatorAddress = base58'3PEktVux2RhchSN63DsDo4b4mz4QqzKSeDv'
6+let incubatorAddress = base58''
77
8-let farmingAddress = base58'3PAETTtuW7aSiyKtn9GuML3RgtV1xdq1mQW'
8+let userAddress = base58''
99
10-let collectiveMasterAddress = base58'3PDktsxDVEcoobpEBJcausnKo4enhcWUDEF'
10+let collectiveMasterAddress = base58''
1111
12-let ref20 = ["3PR66kMvUDE1QvYAg8r6e1xDX7QbnTV7JW5"]
12+let ref20 = [""]
1313
1414 func tryGetInteger (key) = match getInteger(this, key) {
1515 case b: Int =>
4343 }
4444
4545
46-func getRefMultiplier (refererAddress) = if ((indexOf(ref20, refererAddress) != unit))
46+func getRefMultiplier (gatewayAddress) = if ((indexOf(ref20, gatewayAddress) != unit))
4747 then 4
4848 else 1
4949
5050
5151 @Callable(i)
52-func addRefKey (refererAddress,refererKey) = if ((i.caller != this))
52+func addgatewayKey (gatewayAddress,gatewayKey) = if ((i.caller != this))
5353 then throw("admin only")
5454 else {
55- let refStateKey = (("key_" + refererKey) + "_refererAddress")
55+ let refStateKey = (("key_" + gatewayKey) + "_refererAddress")
5656 if ((tryGetString(refStateKey) == ""))
57- then [StringEntry(refStateKey, refererAddress), StringEntry(((("address_" + refererAddress) + "_refererKey_") + refererKey), refererKey)]
58- else throw((("The ref key \"" + refererKey) + "\" is already registered"))
57+ then [StringEntry(refStateKey, gatewayAddress), StringEntry(((("address_" + gatewayAddress) + "_refererKey_") + gatewayKey), gatewayKey)]
58+ else throw((("The ref key \"" + gatewayKey) + "\" is already registered"))
5959 }
6060
6161
6262
6363 @Callable(i)
64-func refPayment (refererKey) = {
64+func gatewayreward (refererKey) = {
6565 let referalAddress = toString(i.originCaller)
6666 if (if ((i.caller.bytes != incubatorAddress))
67- then (i.caller.bytes != farmingAddress)
67+ then (i.caller.bytes != userAddress)
6868 else false)
6969 then throw("This method can be called only by farming and incubator dApps")
7070 else if (if ((refererKey == ""))
7171 then (tryGetString((("address_" + referalAddress) + "_referedBy")) == "")
7272 else false)
7373 then nil
74- else if (masterTryGetBoolean(("farm_" + referalAddress)))
74+ else if (masterTryGetBoolean(("gateway_" + referalAddress)))
7575 then nil
7676 else {
7777 let givenReferer = match getString(this, (("key_" + refererKey) + "_refererAddress")) {
9797 let referalDeliveredReward = (((("referer_" + refererAddress) + "_referal_") + referalAddress) + "_deliveredReward")
9898 if ((refererAddress == referalAddress))
9999 then nil
100- else [StringEntry((("address_" + referalAddress) + "_referedBy"), refererAddress), IntegerEntry(refererEarnedReward, (tryGetInteger(refererEarnedReward) + paymentForReferer)), IntegerEntry(referalDeliveredReward, (tryGetInteger(referalDeliveredReward) + paymentForReferer)), IntegerEntry((((("referer_" + refererAddress) + "_referal_") + referalAddress) + "_amount"), (tryGetInteger((((("referer_" + refererAddress) + "_referal_") + referalAddress) + "_amount")) + 1)), ScriptTransfer(refererAddressValue, paymentForReferer, eggsAssetId)]
100+ else [StringEntry((("address_" + referalAddress) + "_referedBy"), refererAddress), IntegerEntry(refererEarnedReward, (tryGetInteger(refererEarnedReward) + paymentForReferer)), IntegerEntry(referalDeliveredReward, (tryGetInteger(referalDeliveredReward) + paymentForReferer)), IntegerEntry((((("referer_" + refererAddress) + "_referal_") + referalAddress) + "_amount"), (tryGetInteger((((("referer_" + refererAddress) + "_referal_") + referalAddress) + "_amount")) + 1)), ScriptTransfer(refererAddressValue, paymentForReferer, userAddress)]
101101 }
102102 }
103103 }
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-let eggsAssetId = base58'JCGDtrVy64cCJ1wCKfCaiNQMnyYwii71TbE5QeAHfxgF'
4+let nftAssetId = base58''
55
6-let incubatorAddress = base58'3PEktVux2RhchSN63DsDo4b4mz4QqzKSeDv'
6+let incubatorAddress = base58''
77
8-let farmingAddress = base58'3PAETTtuW7aSiyKtn9GuML3RgtV1xdq1mQW'
8+let userAddress = base58''
99
10-let collectiveMasterAddress = base58'3PDktsxDVEcoobpEBJcausnKo4enhcWUDEF'
10+let collectiveMasterAddress = base58''
1111
12-let ref20 = ["3PR66kMvUDE1QvYAg8r6e1xDX7QbnTV7JW5"]
12+let ref20 = [""]
1313
1414 func tryGetInteger (key) = match getInteger(this, key) {
1515 case b: Int =>
1616 b
1717 case _ =>
1818 0
1919 }
2020
2121
2222 func masterTryGetBoolean (key) = match getBoolean(Address(collectiveMasterAddress), key) {
2323 case b: Boolean =>
2424 b
2525 case _ =>
2626 false
2727 }
2828
2929
3030 func isValidAddress (address) = match addressFromString(address) {
3131 case a: Address =>
3232 true
3333 case _ =>
3434 false
3535 }
3636
3737
3838 func tryGetString (key) = match getString(this, key) {
3939 case a: String =>
4040 a
4141 case _ =>
4242 ""
4343 }
4444
4545
46-func getRefMultiplier (refererAddress) = if ((indexOf(ref20, refererAddress) != unit))
46+func getRefMultiplier (gatewayAddress) = if ((indexOf(ref20, gatewayAddress) != unit))
4747 then 4
4848 else 1
4949
5050
5151 @Callable(i)
52-func addRefKey (refererAddress,refererKey) = if ((i.caller != this))
52+func addgatewayKey (gatewayAddress,gatewayKey) = if ((i.caller != this))
5353 then throw("admin only")
5454 else {
55- let refStateKey = (("key_" + refererKey) + "_refererAddress")
55+ let refStateKey = (("key_" + gatewayKey) + "_refererAddress")
5656 if ((tryGetString(refStateKey) == ""))
57- then [StringEntry(refStateKey, refererAddress), StringEntry(((("address_" + refererAddress) + "_refererKey_") + refererKey), refererKey)]
58- else throw((("The ref key \"" + refererKey) + "\" is already registered"))
57+ then [StringEntry(refStateKey, gatewayAddress), StringEntry(((("address_" + gatewayAddress) + "_refererKey_") + gatewayKey), gatewayKey)]
58+ else throw((("The ref key \"" + gatewayKey) + "\" is already registered"))
5959 }
6060
6161
6262
6363 @Callable(i)
64-func refPayment (refererKey) = {
64+func gatewayreward (refererKey) = {
6565 let referalAddress = toString(i.originCaller)
6666 if (if ((i.caller.bytes != incubatorAddress))
67- then (i.caller.bytes != farmingAddress)
67+ then (i.caller.bytes != userAddress)
6868 else false)
6969 then throw("This method can be called only by farming and incubator dApps")
7070 else if (if ((refererKey == ""))
7171 then (tryGetString((("address_" + referalAddress) + "_referedBy")) == "")
7272 else false)
7373 then nil
74- else if (masterTryGetBoolean(("farm_" + referalAddress)))
74+ else if (masterTryGetBoolean(("gateway_" + referalAddress)))
7575 then nil
7676 else {
7777 let givenReferer = match getString(this, (("key_" + refererKey) + "_refererAddress")) {
7878 case x: String =>
7979 x
8080 case _ =>
8181 refererKey
8282 }
8383 let refererAddress = match getString(this, (("address_" + referalAddress) + "_referedBy")) {
8484 case x: String =>
8585 x
8686 case _ =>
8787 givenReferer
8888 }
8989 let refAmount = (i.payments[0].amount * getRefMultiplier(refererAddress))
9090 if ((addressFromString(refererAddress) == unit))
9191 then nil
9292 else {
9393 let refererAddressValue = addressFromStringValue(refererAddress)
9494 let referalAddressValue = addressFromStringValue(referalAddress)
9595 let paymentForReferer = refAmount
9696 let refererEarnedReward = (("address_" + refererAddress) + "_earnedReward")
9797 let referalDeliveredReward = (((("referer_" + refererAddress) + "_referal_") + referalAddress) + "_deliveredReward")
9898 if ((refererAddress == referalAddress))
9999 then nil
100- else [StringEntry((("address_" + referalAddress) + "_referedBy"), refererAddress), IntegerEntry(refererEarnedReward, (tryGetInteger(refererEarnedReward) + paymentForReferer)), IntegerEntry(referalDeliveredReward, (tryGetInteger(referalDeliveredReward) + paymentForReferer)), IntegerEntry((((("referer_" + refererAddress) + "_referal_") + referalAddress) + "_amount"), (tryGetInteger((((("referer_" + refererAddress) + "_referal_") + referalAddress) + "_amount")) + 1)), ScriptTransfer(refererAddressValue, paymentForReferer, eggsAssetId)]
100+ else [StringEntry((("address_" + referalAddress) + "_referedBy"), refererAddress), IntegerEntry(refererEarnedReward, (tryGetInteger(refererEarnedReward) + paymentForReferer)), IntegerEntry(referalDeliveredReward, (tryGetInteger(referalDeliveredReward) + paymentForReferer)), IntegerEntry((((("referer_" + refererAddress) + "_referal_") + referalAddress) + "_amount"), (tryGetInteger((((("referer_" + refererAddress) + "_referal_") + referalAddress) + "_amount")) + 1)), ScriptTransfer(refererAddressValue, paymentForReferer, userAddress)]
101101 }
102102 }
103103 }
104104
105105
106106 @Verifier(tx)
107107 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
108108

github/deemru/w8io/026f985 
51.63 ms