How to use NftStakingV2 contract?

Hi, I am using NftStakingV2 contract for my custom staking contract.

But when I write a new contract implementing this contract, there is an error with "ProviderError: max code size exceeded"

I see many people use this library so if you have any experience in this field, please help me.
I have used Optimizer to optimize, but it not works.

Thanks in advance.

Maybe you can share your contract code, so I can have a try.