tx · 3MTJfdus29nQpnvGwuXjXe2AHRxG1U7tdkkKbUGpnfz1

3N9E2aUbiyf6wn4bSqyATFBEQFUKYy9datz:  -0.01000000 Waves

2022.05.11 15:04 [2046983] smart account 3N9E2aUbiyf6wn4bSqyATFBEQFUKYy9datz > SELF 0.00000000 Waves

{ "type": 13, "id": "3MTJfdus29nQpnvGwuXjXe2AHRxG1U7tdkkKbUGpnfz1", "fee": 1000000, "feeAssetId": null, "timestamp": 1652270723013, "version": 2, "chainId": 84, "sender": "3N9E2aUbiyf6wn4bSqyATFBEQFUKYy9datz", "senderPublicKey": "4RUVreqGaYfi1yVRnNWAip2edczRrUTTiiZwKnd4YD3u", "proofs": [ "4meDT1j2Zzr7AhCLbJcoBaG4FAQL65PyrUeqmsShE8arwp738oQo6KuGKyYnzsPW9LtpDjZ1QyADXijKCBEExHfc" ], "script": "base64:AAIFAAAAAAAAAAQIAhIAAAAABAAAAAAFdG9rZW4BAAAAINtNgzVkRxuW758ML6DPfdV5nZLo4Zs1D8E/zHsCcCkLAAAAAAVscFRDSQEAAAAgDrGi2xaA6dfCrDNxIQzNNT0qFQi1YLNpLE+x9sMEwfwAAAAABGRhcHABAAAAGgFUWUAnk2tLKe6+saEO5txAuM+kjXoM67UPAAAAAAlpc1N0b3BwZWQHAAAAAQAAAAFpAQAAAAVzdGFrZQAAAAAEAAAAA3BtdAkBAAAABXZhbHVlAAAAAQkAAZEAAAACCAUAAAABaQAAAAhwYXltZW50cwAAAAAAAAAAAAQAAAAJcG10QW1vdW50CAUAAAADcG10AAAABmFtb3VudAQAAAAJa2V5U3Rha2VkAgAAAAlTVEFLRURfTFADCQEAAAACIT0AAAACCAUAAAADcG10AAAAB2Fzc2V0SWQFAAAABXRva2VuCQAAAgAAAAECAAAAHWF0dGFjaCBVU0RUVVNETkxQIHRva2VucyBvbmx5AwUAAAAJaXNTdG9wcGVkCQAAAgAAAAECAAAAGXNtYXJ0IGNvbnRyYWN0IGlzIG9uIGxvY2sEAAAACHRr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IJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMIBQAAAAFpAAAABmNhbGxlcgUAAAAHdG9Jc3N1ZQUAAAAFbHBUQ0kJAARMAAAAAgUAAAAHTFBJc3N1ZQkABEwAAAACBQAAAAh0cmFuc2ZlcgkABEwAAAACBQAAAAt1cGRhdGVTdGF0ZQUAAAADbmlsCQAAAgAAAAECAAAAJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgkAAAIAAAABAgAAACRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4AAAAAt+XGwQ==", "height": 2046983, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: FCHUT44R8xPEqWhcHktAou5J8Kjn9B3M8tGYyy5LhuXK Next: AXwdzPFWbf7tszCotwXpZTWh8cDFvL1Q9qmkwrhbWgA4 Diff:
OldNewDifferences
2929 case _ =>
3030 throw("Can't find asset")
3131 }
32- let treasury = ((tkStaked + assetBalance(this, token)) - pmtAmount)
32+ let treasury = (((tkStaked + assetBalance(this, token)) + pmtAmount) - pmtAmount)
3333 let forOne = fraction(totalIssued, 100000000, treasury)
3434 let toIssue = fraction(pmtAmount, forOne, 100000000)
3535 let LPstake = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "stake", nil, [pmt])
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let token = base58'Fm4qczu6Pepz8KUhh3Heb6LeTVfpSMX5vvNgw3x764CS'
55
66 let lpTCI = base58'zMoz8KokhTvMU6GosBdAHrWfg8aCWSpP1nBigwwi63D'
77
88 let dapp = base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'
99
1010 let isStopped = false
1111
1212 @Callable(i)
1313 func stake () = {
1414 let pmt = value(i.payments[0])
1515 let pmtAmount = pmt.amount
1616 let keyStaked = "STAKED_LP"
1717 if ((pmt.assetId != token))
1818 then throw("attach USDTUSDNLP tokens only")
1919 else if (isStopped)
2020 then throw("smart contract is on lock")
2121 else {
2222 let tkStaked = valueOrElse(getInteger(this, keyStaked), 0)
2323 let updateState = IntegerEntry(keyStaked, (tkStaked + i.payments[0].amount))
2424 if ((updateState == updateState))
2525 then {
2626 let totalIssued = match assetInfo(lpTCI) {
2727 case asset: Asset =>
2828 asset.quantity
2929 case _ =>
3030 throw("Can't find asset")
3131 }
32- let treasury = ((tkStaked + assetBalance(this, token)) - pmtAmount)
32+ let treasury = (((tkStaked + assetBalance(this, token)) + pmtAmount) - pmtAmount)
3333 let forOne = fraction(totalIssued, 100000000, treasury)
3434 let toIssue = fraction(pmtAmount, forOne, 100000000)
3535 let LPstake = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "stake", nil, [pmt])
3636 if ((LPstake == LPstake))
3737 then {
3838 let LPIssue = Reissue(lpTCI, toIssue, true)
3939 let transfer = ScriptTransfer(i.caller, toIssue, lpTCI)
4040 [LPIssue, transfer, updateState]
4141 }
4242 else throw("Strict value is not equal to itself.")
4343 }
4444 else throw("Strict value is not equal to itself.")
4545 }
4646 }
4747
4848

github/deemru/w8io/169f3d6 
44.40 ms