I have a dapp that compiles a solidity smart contract in the backend server. I want the user to send a transaction that'll deploy the contract. Basically the user enters the name and the symbol as input in a form on the frontend. The backend server uses those as parameters and makes a NFT contract and the user deploys it by sending a transaction from their wallet.

How does that work, i am able to compile the contract in the backend but not able to figure out a way so that the user can deploy it.

2 Answers 2


If you want the user to pay for the deployment you have to return the compiled bytecode and prepare the transaction on the client side.


I think it's better make another contract, expose a function in the contract which deploys the target contract, and let users interact with this contract with their wallet directly in frontend.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.