Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Developer Tools #3

Open
AddressXception opened this issue Apr 20, 2022 · 0 comments
Open

Developer Tools #3

AddressXception opened this issue Apr 20, 2022 · 0 comments
Labels
tooling tools and other things that help developers

Comments

@AddressXception
Copy link
Member

In order to work with Ethereum networks we need to install some tooling that will make our lives much easier.

Metamask

Metamask is a browser extension that stores a mnemonic seed phrase encrypted on your hard drive and can derive public/private key pairs and create wallets from the seed phrase. When you install Metamask it will ask you to write down the seed words and store them in a safe place. You should do that and follow the instructions so that if our laptop is ever lost, you can recover your wallets from your seed phrase. There are many articles describing Ethereum security best practices if you are interested in security.

Once Metamask is configured it will automatically create an account for you called Account 1. Get familiar with the Metamask interface. At the top of the browser extension you can switch the network from Ethereum Mainnet to a variety of other predefined networks. We will be using the rinkeby test network for the remainder of the project so go ahead and switch to rinkeby. If you don't see it in the list of networks, you may have to enable "developer test networks" in the metamask settings.

Funding your Account

In order to work on Ethereum networks you have to have Ethereum cryptocurrency. You can get some test Ethereum from a faucet. This does not have any real value.

VS Code Solidity Extension

The VS code extension enables language support for solidity and also allows you to use a javascript linter to clean up code files. It's pretty self-explanatory.

Hardhat

Hardhat has many interesting features including a plugin framework. I recommend exploring their documentation to get familiar with it's features.

Ethers.js

Ethers.js is a js library that provides a clean interface for doing all sorts of things with ethereum code including connecting to nodes, unlocking wallets, signing transactions, deploying contracts, etc. It is our workhorse. I also recommend exploring their documentation but it is regrettably not well-designed for beginners. If you get stuck, just ask.

At a high level it is important to understand some core concepts in ethers.

  • Signers - signers are an abstract term for a wallet.
  • Providers - a provider is any JSON-RPC endpoint that provides access to an Ethereum network. Alchemy is a provider, Infura is a provider, and in some cases, localhost can also be a provider.
  • Contracts - a contract is defined by it's "application binary interface" or ABI. the ABI is a json specification that tells Ethereum clients how to call the contract functions.
  • Deployments - a deployment is a specific instance of a contract deployed on a network and callable by users.
  • Contract Instance - a contract instance is a unique session of a contract deployment that has a wallet attached to it.

Open Zepplin

Open zepplin is a smart contract framework that can be used for rapid prototyping and also deploying production-ready code for very specific contract patterns. It includes robust contracts that have been security audited and are flexible for a variety of use cases.

Because OZ is flexibly, it is also a bit bloated and therefore it is not very efficient. We will examine the effects of this later but OZ contract deployments can be multiple times more costly to deploy and interact with than optimized contracts.

@AddressXception AddressXception added the tooling tools and other things that help developers label Apr 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tooling tools and other things that help developers
Projects
None yet
Development

No branches or pull requests

1 participant