Skip to content

Commit

Permalink
Merge pull request #1066 from moonbeam-foundation/themacexpert/wafMars
Browse files Browse the repository at this point in the history
Waffle and Mars Modernize
eshaben authored Jan 22, 2025
2 parents 61d0732 + 942d9db commit ad599e6
Showing 10 changed files with 51 additions and 4 deletions.
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>>waffle-mars@1.0.0 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> > waffle-mars@1.0.0 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> > waffle-mars@1.0.0 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> > waffle-mars@1.0.0 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
@@ -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.

@@ -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.
@@ -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!
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 comments on commit ad599e6

Please sign in to comment.