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

Add Buidler Tutorial for beginners #483

Merged
merged 38 commits into from
Apr 18, 2020
Merged

Add Buidler Tutorial for beginners #483

merged 38 commits into from
Apr 18, 2020

Conversation

viarnes
Copy link
Contributor

@viarnes viarnes commented Mar 26, 2020

This adds a new section to the website that works with its own sidebar.

@viarnes viarnes requested a review from alcuadrado March 26, 2020 15:21
packages/buidler-core/README.md Show resolved Hide resolved
docs/tutorial/1-setup/README.md Outdated Show resolved Hide resolved
docs/tutorial/1-setup/README.md Outdated Show resolved Hide resolved
docs/tutorial/2-install/README.md Outdated Show resolved Hide resolved
docs/tutorial/3-config/README.md Outdated Show resolved Hide resolved
docs/tutorial/3-config/README.md Outdated Show resolved Hide resolved
docs/tutorial/4-contracts/README.md Outdated Show resolved Hide resolved
docs/tutorial/5-test/README.md Outdated Show resolved Hide resolved
docs/tutorial/5-test/README.md Outdated Show resolved Hide resolved
docs/tutorial/5-test/README.md Outdated Show resolved Hide resolved
@@ -1,143 +1,145 @@
# 5. Testing contracts

Smart contracts are normally tested using JavaScript. You develop the contract in Solidity, but use an Ethereum library to have a JavaScript model of your contract and write your tests with it. This saves a lot of time because you don’t have to spend the time manually executing the code yourself.
Writing automated tests when building smart contracts is of crucial importance, as your user's money is what's at stake. For this we're going to use **Buidler EVM**, a local Ethereum network designed for development that is built-in and the default network in **Buidler**. You don't need to setup anything to use it. In our tests we're going to use ethers.js to model and interact with the Ethereum contract we built in the previous section, and [Mocha](https://mochajs.org/) as our test runner.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO the text should focus on explaining why/how contracts are tested with JavaScript. What about something like:

Writing automated tests when building smart contracts is of crucial importance, as your user's money is what's at stake.

Smart contracts are normally tested using JavaScript. You develop the contract in Solidity, but use an Ethereum library to have a JavaScript model of your contract and write your tests with it. This saves a lot of time because you don't have to spend the time manually executing and signing transactions.

In this tutorial we're going to use Ether.js and Waffle (which uses Mocha under the hood). The tests will be running on Buidler EVM, a local Ethereum network designed for development that is built-in and the default network in Buidler. You don't need to setup anything to use it as we already did.

@alcuadrado alcuadrado merged commit ba2e5eb into development Apr 18, 2020
@alcuadrado alcuadrado deleted the tutorial branch April 18, 2020 12:24
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 22, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants