S

safe-deploy

safe-deploy is an npm package to deploy Smart Contract from the browser by connecting Metamask wallet on a locally served webpage(on localhost).

The problem safe-deploy solves

A lot of developers are getting into web3 and getting scammed by unintentionally pushing the private key in their code. This tool will help to safely deploy Smart Contracts without plugging the private key into the development environment. Recently, saw many of my friends losing the crypto assets that they received at Eth-Online and other similar hackathons. This just made me feel like building the same.
I want to make sure that nobody loses their earned asset just because they were getting into the web3 ecosystem and just started developing. This package can be used as a standalone tool for deployment now but it can also be integrated with hardhat to fix the issue.

Challenges I ran into

I have never built a package before and never used solc compiler internally. I used to build Smart Contract using hardhat by adding my private key in the config file.
The hardest thing was to figure out how to use solidity file data to mould it into a transaction. So, i just tried compiling the solidity file as soon as it's fetched and post it to the frontend internally.
Currently, it can only be used with single solidity file and breaks if any 'import' statement is found.

Tracks Applied (2)

Ethereum Track

This package can be used to deploy Smart Contract on on Ethereum without risking on plugging private key in the codebase...Read More

Polygon

Ethereum + Polygon Track

This package can be used to deploy Smart Contract on on Ethereum and Polygon without risking on plugging private key in ...Read More

Polygon

Discussion