I needed to deploy a smart contract the other day with my hardware wallet and found the process way more convoluted than I expected, so I made this dead simple site: https://www.deploysmartcontract.com/.

This lets you take your compiled contract's ABI and bytecode (compiled with something like Remix, hardhat, truffle, Foundry, etc) along with your desired constructor arguments, and deploy via clicking a button that pops up Metamask. No coding required, but if you want to code, then the 3 lines of code you'd need are there too.

Yes Remix allows one to compile and deploy contracts via "Injected Provider - Metamask", but for whatever reason that's not working for me anymore and the "deploy" button is greyed out without any error message.

If you want to deploy it yourself with code, then it's literally just 3 lines of code in the browser with the ethers library (v5.7.2)

```

const factory = new ethers.ContractFactory(abi, bytecode, signer);

const contract = await factory.deploy(...constructorArgs);

await contract.deployed();

```

I use the hardhat npm library for compiling the contract, testing, and deploying locally. I just wasn't able to deploy with it using my hardware wallet (Trezor).

I'm surprised Metamask doesn't just have this feature directly in the interface (wait their UI/UX is pretty subpar, so I'm not surprised).

Yea the site is dead simple and nothing to call the newspapers about. I've been inspired by these "boring" simple utility websites that rack in millions of views, and this was a case where I wanted something like this to exist, so I created it and felt it'd be worth the small time investment. Also I see it as a warmup for a grander idea I have. Stay tuned, and keep shipping...

0 comments