tx · FzMW8RBaeRjCPu83mJspDApgzkqLKMNzZbs8DxzudBFf

3Mx8raFsQfjh2JBeT8MN1Jv5sTvGkx5PDDS:  -0.01500000 Waves

2023.08.26 22:47 [2728071] smart account 3Mx8raFsQfjh2JBeT8MN1Jv5sTvGkx5PDDS > SELF 0.00000000 Waves

{ "type": 13, "id": "FzMW8RBaeRjCPu83mJspDApgzkqLKMNzZbs8DxzudBFf", "fee": 1500000, "feeAssetId": null, "timestamp": 1693079250295, "version": 2, "chainId": 84, "sender": "3Mx8raFsQfjh2JBeT8MN1Jv5sTvGkx5PDDS", "senderPublicKey": "HmWR8GbhBF4LAodJ9xNgR7PpWF79RuCrhPWJWxqdB1KL", "proofs": [ "2tcA928S2PcG2o4YkVQiwAG9NKQNNmoT9nCYDgqadhLV6Ebm5w8tYBJhrCi4o6de6q6PMpKH4R53Vd8LHt6eRj1u" ], "script": "base64:AAIFAAAAAAAAAAkIAhIAEgMKAQEAAAACAAAAABFscF9hZGRyZXNzX3B1YmtleQEAAAAg+SHOoR+6ay5qXj57vjRzml+/6VMYqCQMV4ukn2GjgTcAAAAAEXdoaXRlbGlzdF9hZGRyZXNzCQEAAAAUYWRkcmVzc0Zyb21QdWJsaWNLZXkAAAABBQAAABFscF9hZGRyZXNzX3B1YmtleQAAAAIAAAABaQEAAAAQQWRkUG9vbExpcXVpZGl0eQAAAAAEAAAADWNhbGxlcmFkZHJlc3MJAAJYAAAAAQgIBQAAAAFpAAAABmNhbGxlcgAAAAVieXRlcwQAAAADcG10AwkAAAAAAAACCQABkAAAAAEIBQAAAAFpAAAACHBheW1lbnRzAAAAAAAAAAABCQABkQAAAAIIBQAAAAFpAAAACHBheW1lbnRzAAAAAAAAAAAACQAAAgAAAAECAAAASU5vIHBheW1lbnQgYXR0YWNoZWQsIFBsZWFzZSBBdHRhY2ggb25seSBXaGl0ZWxpc3RlZCBUb2tlbnMgaW4gcGF5bWVudFsxXS4EAAAAIVByZXZpb3VzRnVuZHNBZGRlZFRvUG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dGlvbgQAAAABdAUAAAAHJG1hdGNoMAcJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V59OrKlQ==", "height": 2728071, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: BSLZHBkG8bMkvTYjFYYgrin4VU8AWVeP3QuSBJsT3wtq Next: ENEhhdZUpyu5AVBNzMY9L3KbT1MWSJzgfiGRQTGWq88e Diff:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4+let lp_address_pubkey = base58'HmWR8GbhBF4LAodJ9xNgR7PpWF79RuCrhPWJWxqdB1KL'
45
6+let whitelist_address = addressFromPublicKey(lp_address_pubkey)
57
68 @Callable(i)
79 func AddPoolLiquidity () = {
1517 case _ =>
1618 0
1719 }
18- let TotalFundsFundsAddedToPoolbyCompany = (PreviousFundsAddedToPoolbyCompany + pmt.amount)
20+ let TotalFundsAddedToPoolbyCompany = (PreviousFundsAddedToPoolbyCompany + pmt.amount)
1921 let PreviousPoolLiquidity = match getInteger(this, "Total_Pool_Liquidity") {
2022 case a: Int =>
2123 a
3234 let TotalLPDepositCounter = (PreviousLPDepositCounter + 1)
3335 if (isDefined(pmt.assetId))
3436 then throw("Only WAVES is allowed to deposit at the moment")
35- else [IntegerEntry("Total_Pool_Liquidity", TotalPoolLiquidity), IntegerEntry("LP_Deposit_Counter", TotalLPDepositCounter), IntegerEntry("Total_LP_Added", TotalFundsFundsAddedToPoolbyCompany)]
37+ else [IntegerEntry("Total_Pool_Liquidity", TotalPoolLiquidity), IntegerEntry("LP_Deposit_Counter", TotalLPDepositCounter), IntegerEntry("Total_LP_Added", TotalFundsAddedToPoolbyCompany)]
38+ }
39+
40+
41+
42+@Callable(i)
43+func UpdateLPBalance (PaidMassTransferAmount) = {
44+ let read_total_pool_liquidity = valueOrErrorMessage(getInteger(this, "Total_Pool_Liquidity"), "No Initial Pool Liquidity was Found.")
45+ let updated_pool_balance = (read_total_pool_liquidity - PaidMassTransferAmount)
46+ let PreviousMassTransferCounter = match getInteger(this, "Mass_Transfer_Counter") {
47+ case a: Int =>
48+ a
49+ case _ =>
50+ 0
51+ }
52+ let TotalMassTransferCounter = (PreviousMassTransferCounter + 1)
53+ let PreviousMassTransferSend = match getInteger(this, "Total_Mass_Transfer_Send") {
54+ case a: Int =>
55+ a
56+ case _ =>
57+ 0
58+ }
59+ let TotalMassTransferSend = (PreviousMassTransferSend + PaidMassTransferAmount)
60+ if ((i.caller != whitelist_address))
61+ then throw((("This Address is not Authorized. Only " + toString(whitelist_address)) + " is Authorized Address to Sign it."))
62+ else [IntegerEntry("Total_Pool_Liquidity", updated_pool_balance), IntegerEntry("Total_Mass_Transfer_Send", TotalMassTransferSend), IntegerEntry((toString(TotalMassTransferCounter) + "_Mass_Transfer_Send"), PaidMassTransferAmount)]
3663 }
3764
3865
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4+let lp_address_pubkey = base58'HmWR8GbhBF4LAodJ9xNgR7PpWF79RuCrhPWJWxqdB1KL'
45
6+let whitelist_address = addressFromPublicKey(lp_address_pubkey)
57
68 @Callable(i)
79 func AddPoolLiquidity () = {
810 let calleraddress = toBase58String(i.caller.bytes)
911 let pmt = if ((size(i.payments) == 1))
1012 then i.payments[0]
1113 else throw("No payment attached, Please Attach only Whitelisted Tokens in payment[1].")
1214 let PreviousFundsAddedToPoolbyCompany = match getInteger(this, "Total_LP_Added") {
1315 case a: Int =>
1416 a
1517 case _ =>
1618 0
1719 }
18- let TotalFundsFundsAddedToPoolbyCompany = (PreviousFundsAddedToPoolbyCompany + pmt.amount)
20+ let TotalFundsAddedToPoolbyCompany = (PreviousFundsAddedToPoolbyCompany + pmt.amount)
1921 let PreviousPoolLiquidity = match getInteger(this, "Total_Pool_Liquidity") {
2022 case a: Int =>
2123 a
2224 case _ =>
2325 0
2426 }
2527 let TotalPoolLiquidity = (PreviousPoolLiquidity + pmt.amount)
2628 let PreviousLPDepositCounter = match getInteger(this, "LP_Deposit_Counter") {
2729 case a: Int =>
2830 a
2931 case _ =>
3032 0
3133 }
3234 let TotalLPDepositCounter = (PreviousLPDepositCounter + 1)
3335 if (isDefined(pmt.assetId))
3436 then throw("Only WAVES is allowed to deposit at the moment")
35- else [IntegerEntry("Total_Pool_Liquidity", TotalPoolLiquidity), IntegerEntry("LP_Deposit_Counter", TotalLPDepositCounter), IntegerEntry("Total_LP_Added", TotalFundsFundsAddedToPoolbyCompany)]
37+ else [IntegerEntry("Total_Pool_Liquidity", TotalPoolLiquidity), IntegerEntry("LP_Deposit_Counter", TotalLPDepositCounter), IntegerEntry("Total_LP_Added", TotalFundsAddedToPoolbyCompany)]
38+ }
39+
40+
41+
42+@Callable(i)
43+func UpdateLPBalance (PaidMassTransferAmount) = {
44+ let read_total_pool_liquidity = valueOrErrorMessage(getInteger(this, "Total_Pool_Liquidity"), "No Initial Pool Liquidity was Found.")
45+ let updated_pool_balance = (read_total_pool_liquidity - PaidMassTransferAmount)
46+ let PreviousMassTransferCounter = match getInteger(this, "Mass_Transfer_Counter") {
47+ case a: Int =>
48+ a
49+ case _ =>
50+ 0
51+ }
52+ let TotalMassTransferCounter = (PreviousMassTransferCounter + 1)
53+ let PreviousMassTransferSend = match getInteger(this, "Total_Mass_Transfer_Send") {
54+ case a: Int =>
55+ a
56+ case _ =>
57+ 0
58+ }
59+ let TotalMassTransferSend = (PreviousMassTransferSend + PaidMassTransferAmount)
60+ if ((i.caller != whitelist_address))
61+ then throw((("This Address is not Authorized. Only " + toString(whitelist_address)) + " is Authorized Address to Sign it."))
62+ else [IntegerEntry("Total_Pool_Liquidity", updated_pool_balance), IntegerEntry("Total_Mass_Transfer_Send", TotalMassTransferSend), IntegerEntry((toString(TotalMassTransferCounter) + "_Mass_Transfer_Send"), PaidMassTransferAmount)]
3663 }
3764
3865
3966 @Verifier(tx)
4067 func verify () = match tx {
4168 case t: Order|ExchangeTransaction|TransferTransaction =>
4269 false
4370 case _ =>
4471 sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
4572 }
4673

github/deemru/w8io/026f985 
25.20 ms