I am trying to deploy an upgradeable smart contract on bsc testnet using hardhat. But after running npx hardhat run --network testnet scripts/deploy.js
it gives me the following error.
ProviderError: max code size exceeded
at HttpProvider.request (D:\rarible-hardhat\protocol-contracts\tokens\node_modules\hardhat\src\internal\core\providers\http.ts:46:19)ts:46:19) ccounts.ts:142:34)
at HDWalletProvider.request (D:\rarible-hardhat\protocol-contracts\tokens\node_modules\hardhat\src\internal\core\providers\accounts.ts:142:34) nal\ethers-provider-wrapper.ts:13:20)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at EthersProviderWrapper.send (D:\rarible-hardhat\protocol-contracts\tokens\node_modules\@nomiclabs\hardhat-ethers\src\internal\ethers-provider-wrapper.ts:13:20)
How can I adjust the code size or any other method to resolve this error.