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

Waffle and Mars Modernize #1066

Merged
merged 3 commits into from
Jan 22, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<div id="termynal" data-termynal>
<span data-ty="input"><span class="file-path"></span>npm run build</span>
<span data-ty>>[email protected] build</span>
<span data-ty>>waffle</span>
<span data-ty>Warning: SPDX license identifier not provided in source file. Before publishing, consider adding a comment containing "SPDX-License-Identifier: «SPDX-License>" to each source file. Use "SPDX-License-Identifier: UNLICENSED" for non-open-source code. Please see https://spdx.org for more information.</span>
<span data-ty>--> contracts/MyToken.sol</span>
<span data-ty="input"><span class="file-path"></span></span>
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<div id="termynal" data-termynal>
<span data-ty="input"><span class="file-path"></span>npm run build</span>
<br>
<span data-ty> > [email protected] build</span>
<span data-ty> > waffle && mars</span>
<br>
<span data-ty>Warning: SPDX license identifier not provided in source file. Before publishing, consider adding a comment containing "SPDX-License-Identifier: <SPDX-License>" to each source file. Use "SPDX-License-Identifier: UNLICENSED" for non-open-source code. Please see https://spdx.org for more information.</span>
<span data-ty>--> contracts/MyToken.sol</span>
<br>
<span data-ty="input"><span class="file-path"></span></span>
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<div id="termynal" data-termynal>
<span data-ty="input"><span class="file-path"></span>npm run deploy</span>
<br>
<span data-ty> > [email protected] deploy</span>
<span data-ty> > ts-node src/deploy.ts</span>
<br>
<span data-ty>Transaction: Deploy myToken</span>
<span data-ty>Fee: $0.00, Ξ0.0</span>
<span data-ty>Balance: $4142380208.17,Ξ1207925.819614629174706176</span>
<span data-ty>ENTER to submit, Ctrl+C to exit...</span>
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<div id="termynal" data-termynal>
<span data-ty="input"><span class="file-path"></span>npm run deploy</span>
<br>
<span data-ty> > [email protected] deploy</span>
<span data-ty> > ts-node src/deploy.ts</span>
<br>
<span data-ty>Transaction: Deploy myToken</span>
<span data-ty>Fee: $0.00,Ξ0.0</span>
<span data-ty>Balance:</span>
<span data-ty>Sending</span>
<span data-ty>Block: 1</span>
<span data-ty>$4142380208.17, Ξ1207925.819614629174706176</span>
<span data-ty>Hash: Oxfa8bcad89cb8efdabfc@e5575dbe7151ce1c38f8aa67229fd5122bbdafe8b2f9</span>
<span data-ty>Address: 0xC2Bf5F29a4384b1aB0C063e1c666f02121B6084a</span>
<br>
<span data-ty="input"><span class="file-path"></span></span>
</div>
8 changes: 4 additions & 4 deletions builders/ethereum/dev-env/waffle-mars.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ That is all you need to do to configure Waffle, now you're all set to compile th
npm run build
```

![Waffle compiler output](/images/builders/ethereum/dev-env/waffle-mars/waffle-mars-1.webp)
--8<-- 'code/builders/ethereum/dev-env/waffle-mars/terminal/build-1.md'

After compiling your contracts, Waffle stores the JSON output in the `build` directory. Since the contract in this guide is based on OpenZeppelin's ERC-20 template, relevant ERC-20 JSON files will appear in the `build` directory too.

Expand Down Expand Up @@ -375,7 +375,7 @@ Artifacts need to be generated for Mars so that typechecks are enabled within de
npm run build
```

![Waffle and Mars compiler output](/images/builders/ethereum/dev-env/waffle-mars/waffle-mars-2.webp)
--8<-- 'code/builders/ethereum/dev-env/waffle-mars/terminal/build-2.md'

If you open the `build` directory, you should now see an `artifacts.ts` file containing the artifact data needed for deployments. To continue on with the deployment process, you'll need to write a deployment script. The deployment script will be used to tell Mars which contract to deploy, to what network, and which account is to be used to trigger the deployment.

Expand Down Expand Up @@ -443,11 +443,11 @@ You've configured the deployment, now it's time to actually deploy to Moonbase A

2. In your Terminal, Mars will prompt you to press `ENTER` to send your transaction

![Mars confirm deployment](/images/builders/ethereum/dev-env/waffle-mars/waffle-mars-3.webp)
--8<-- 'code/builders/ethereum/dev-env/waffle-mars/terminal/deploy-1.md'

If successful, you should see details about your transaction including it's hash, the block it was included in, and it's address.

![Mars deployment output](/images/builders/ethereum/dev-env/waffle-mars/waffle-mars-4.webp)
--8<-- 'code/builders/ethereum/dev-env/waffle-mars/terminal/deploy-2.md'

Congratulations! You've deployed a contract to Moonbase Alpha using Waffle and Mars!

Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.