Deploy FAQs

General FAQs

Do I need an API Key for deploying a smart contract using npx thirdweb deploy?

Yes, you need to authenticate via your CLI in order to deploy contracts using Deploy. Here is an overview of our updated CLI login flow.

What are the benefits of using Deploy?

-Decrease your go-to-market time by deploying smart contracts with one command line or with a few clicks on our dashboard. A simplified workflow for developers, with no more copying ABIs or generating bindings.

-Eliminate any risk from your workflow. No need to share private keys as deployment is managed via our dashboard. No need to deal with insecure and unfunded private keys required with local deploys.

-Unlock a full Web3 development stack for any smart contract. Access powerful tooling that allows you to easily build apps on top of your contracts, including Wallets, SDKs, Payments and Infrastructure.


I’m getting an error Error: Unauthorized - You don't have permission to use this service. How can I resolve this?

If you are running into this issue, please try the following steps:

  1. Run npx thirdweb logout, after that: npx thirdweb login
  1. Disconnect your wallet from the dashboard and connect again
  1. Finally, update the thirdweb CLI, or you can just run: npx thirdweb@latest deploy

This should resolve the issues. If you are still running into issues, please contact us in Discord.

I’m getting an error max code size exceeded. How can I resolve this?

There are size restrictions that you need to keep in mind while you deploy a contract, any contract that is to be deployed has to follow the size limitations which is set by the blockchain. First, you can try compressing your contract in the optimizer settings. If that still does not work, you will need to modify your contract logic to fit within the maximum code size.

Why are contracts deployed via Deploy more expensive in gas compared to Explore?

When deploying a contract via explorer, you are deploying a “slimmed down” version of that contract, called a proxy (learn more about proxy contracts here) When deploying a contract via deploy, you are deploying the whole contract or “Direct deploying”

How do I verify my smart contract when using deploy

If the contract has been deployed, but not yet published, you can verify the contract with the following script

Why is my contract not detected when running `npx thirdweb deploy`?

There are a few reasons this may happen, one of the biggest reasons is the use libraries with external methods in them would cause your contract to not be detected.

Did this answer your question?