tx · Fgdns7VYeydfBjZ8JHuqaXBmctWj4BrdVe5Kk6qh3oGE

3Mzp2SVcAMDBu3Q4aG4EtTQGTKRtpkSsGFy:  -0.01000000 Waves

2022.04.02 01:12 [1990106] smart account 3Mzp2SVcAMDBu3Q4aG4EtTQGTKRtpkSsGFy > SELF 0.00000000 Waves

{ "type": 13, "id": "Fgdns7VYeydfBjZ8JHuqaXBmctWj4BrdVe5Kk6qh3oGE", "fee": 1000000, "feeAssetId": null, "timestamp": 1648851163570, "version": 2, "chainId": 84, "sender": "3Mzp2SVcAMDBu3Q4aG4EtTQGTKRtpkSsGFy", "senderPublicKey": "9VSM67p8B4gEswZ5qFTRqzuBxkRT9kvkvTbRjDdwiAD2", "proofs": [ "2DzpNbN8uKVYEedqQs6KLnv1KEQNKyrVhhn22jfQD4WvNpWDa5w1YBx1YYHiBtsu3cJApHP7PLAmEamQ3JAb7kzV" ], "script": "base64:AAIFAAAAAAAAAAQIAhIAAAAABAAAAAAEdXNkTgEAAAAgD/IcEqzkxDya7EYaqyWosOy6BytGzG2IcvC14pJJAbQAAAAABnN0YWtlcgkBAAAAB0FkZHJlc3MAAAABAQAAABoBVDRN1hxurYPxlZgKuniaPP5OOF3+bmEyywAAAAAJbGVhc2VQb29sCQEAAAAHQWRkcmVzcwAAAAEBAAAAGgFUNE3WHG6tg/GVmAq6eJo8/k44Xf5uYTLLAAAAAApzaGFyZVRva2VuAQAAACAN1EdMdSgTCfvPg6qwJMmO22iRJQqRdvbLCj8IyZLdtgAAAAEAAAABaQEAAAAMYWRkTGlxdWlkaXR5AAAAAAMDCQEAAAACIT0AAAACCAkAAZEAAAACCAUAAAABaQAAAAhwYXltZW50cwAAAAAAAAAAAAAAAAdhc3NldElkBQAAAAR1bml0BgkBAAAAAiE9AAAAAggJAAGRAAAAAggFAAAAAWkAAAAIcGF5bWVudHMAAAAAAAAAAAEAAAAHYXNzZXRJZAUAAAAEdXNkTgkAAAIAAAABAgAAABF1bmV4cGVjdGVkIGFzc2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gkBAAAAC0xlYXNlQ2FuY2VsAAAAAQkAAlkAAAABBQAAAAJpZAUAAAADbmlsCQAETAAAAAIJAQAAAAtTdHJpbmdFbnRyeQAAAAIFAAAABWlkS2V5CQACWAAAAAEFAAAACm5ld0xlYXNlSWQFAAAAA25pbAkABE4AAAACBQAAAAZjYW5jZWwJAARMAAAAAgUAAAAIbmV3TGVhc2UJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwgFAAAAAWkAAAAGY2FsbGVyAAAAAAAAAAABBQAAAApzaGFyZVRva2VuCQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACBQAAAA5sZWFzZUFtb3VudEtleQkAAGQAAAACBQAAAAxsZWFzZWRBbW91bnQICQABkQAAAAIIBQAAAAFpAAAACHBheW1lbnRzAAAAAAAAAAAAAAAABmFtb3VudAkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgUAAAAQc3Rha2luZ0Ftb3VudEtleQUAAAANc3Rha2luZ0Ftb3VudAUAAAADbmlsCQAAAgAAAAECAAAAJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgAAAADTAQuC", "height": 1990106, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 8ndH7wAZbp4FoYmRaf9BZx6apDQCdSaZkGkMwynbjhiR Next: none Diff:
OldNewDifferences
55
66 let staker = Address(base58'3MtgeA4XXgXJ8JUcFnX7U4X5GFzisbnoZcW')
77
8-let leasePool = Address(base58'3Mzp2SVcAMDBu3Q4aG4EtTQGTKRtpkSsGFy')
8+let leasePool = Address(base58'3MtgeA4XXgXJ8JUcFnX7U4X5GFzisbnoZcW')
99
1010 let shareToken = base58'vz3LSXQhs64FAd77oURX16nhJuB8YYe5NLB2em8AC5j'
1111
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let usdN = base58'25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT'
55
66 let staker = Address(base58'3MtgeA4XXgXJ8JUcFnX7U4X5GFzisbnoZcW')
77
8-let leasePool = Address(base58'3Mzp2SVcAMDBu3Q4aG4EtTQGTKRtpkSsGFy')
8+let leasePool = Address(base58'3MtgeA4XXgXJ8JUcFnX7U4X5GFzisbnoZcW')
99
1010 let shareToken = base58'vz3LSXQhs64FAd77oURX16nhJuB8YYe5NLB2em8AC5j'
1111
1212 @Callable(i)
1313 func addLiquidity () = if (if ((i.payments[0].assetId != unit))
1414 then true
1515 else (i.payments[1].assetId != usdN))
1616 then throw("unexpected assets")
1717 else {
1818 let r = invoke(staker, "stake", nil, [i.payments[1]])
1919 if ((r == r))
2020 then {
2121 let stakingAmount = match r {
2222 case a: Int =>
2323 a
2424 case _ =>
2525 throw("unexpected result type from the staker")
2626 }
2727 let stakingAmountKey = ("STAKING_AMOUNT_" + toString(i.caller))
2828 let leaseAmountKey = ("LEASE_AMOUNT_" + toString(i.caller))
2929 let idKey = ("ID_" + toString(i.caller))
3030 let leasedAmount = valueOrElse(getInteger(this, leaseAmountKey), 0)
3131 let leaseId = getString(this, idKey)
3232 let newLease = Lease(leasePool, (leasedAmount + i.payments[0].amount))
3333 let newLeaseId = calculateLeaseId(newLease)
3434 let cancel = match leaseId {
3535 case id: String =>
3636 [LeaseCancel(fromBase58String(id))]
3737 case _ =>
3838 [StringEntry(idKey, toBase58String(newLeaseId))]
3939 }
4040 (cancel ++ [newLease, ScriptTransfer(i.caller, 1, shareToken), IntegerEntry(leaseAmountKey, (leasedAmount + i.payments[0].amount)), IntegerEntry(stakingAmountKey, stakingAmount)])
4141 }
4242 else throw("Strict value is not equal to itself.")
4343 }
4444
4545

github/deemru/w8io/169f3d6 
74.48 ms