Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #902 from moonbeam-foundation/themacexpert/hardhat
Update Hardhat Tutorials to Use Hardhat Ignition Modules
- Loading branch information
Showing
18 changed files
with
510 additions
and
263 deletions.
There are no files selected for viewing
13 changes: 13 additions & 0 deletions
13
.snippets/code/builders/build/eth-api/dev-env/hardhat/terminal/compile.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<div id="termynal" data-termynal> | ||
<span data-ty="input"><span class="file-path"></span>npx hardhat compile</span> | ||
<span data-ty>Compiled 1 Solidity files successfully (evm target: paris).</span> | ||
<span data-ty="input"><span class="file-path"></span>ls -l</span> | ||
<span data-ty>artifacts</span> | ||
<span data-ty>cache</span> | ||
<span data-ty>contracts</span> | ||
<span data-ty>hardhat.config.js</span> | ||
<span data-ty>node_modules</span> | ||
<span data-ty>package.json</span> | ||
<span data-ty>package-lock.json</span> | ||
<span data-ty="input"><span class="file-path"></span></span> | ||
</div> |
18 changes: 18 additions & 0 deletions
18
.snippets/code/builders/build/eth-api/dev-env/hardhat/terminal/deploy-moonbase.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<div id="termynal" data-termynal> | ||
<span data-ty="input"><span class="file-path"></span> npx hardhat ignition deploy ./ignition/modules/Box.js --network moonbase</span> | ||
<br> | ||
<span data-ty>✅ Confirm deploy to network moonbase (1287)? … yes</span> | ||
<span data-ty>Hardhat Ignition 🚀</span> | ||
<br> | ||
<span data-ty>Deploying [ BoxModule ]</span> | ||
<br> | ||
<span data-ty>Batch #1</span> | ||
<span data-ty>Executed BoxModule#Box</span> | ||
<br> | ||
<span data-ty>[ BoxModule ] successfully deployed 🚀</span> | ||
<br> | ||
<span data-ty>Deployed Addresses</span> | ||
<br> | ||
<span data-ty>BoxModule#Box - 0xfBD78CE8C9E1169851119754C4Ea2f70AB159289</span> | ||
<span data-ty="input"><span class="file-path"></span></span> | ||
</div> |
20 changes: 20 additions & 0 deletions
20
.snippets/code/builders/build/eth-api/dev-env/hardhat/terminal/hardhat-create.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<div id="termynal" data-termynal> | ||
<span data-ty="input"><span class="file-path"></span>npx hardhat init</span> | ||
<span data-ty>888 888 888 888 888</span> | ||
<span data-ty>888 888 888 888 888</span> | ||
<span data-ty>888 888 888 888 888</span> | ||
<span data-ty>8888888888 8888b. 888d888 .d88888 88888b. 8888b. 888888</span> | ||
<span data-ty>888 888 "88b 888P" d88" 888 888 "88b "88b 888</span> | ||
<span data-ty>888 888 .d888888 888 888 888 888 888 .d888888 888</span> | ||
<span data-ty>888 888 888 888 888 Y88b 888 888 888 888 888 Y88b.</span> | ||
<span data-ty>888 888 "Y888888 888 "Y88888 888 888 "Y888888 "Y888</span> | ||
<br> | ||
<span data-ty>👷 Welcome to Hardhat v2.22.2 👷</span> | ||
<br> | ||
<span data-ty="input" data-ty-prompt="?"> What do you want to do? …</span> | ||
<span data-ty> Create a JavaScript project </span> | ||
<span data-ty> Create a TypeScript project </span> | ||
<span data-ty> Create a TypeScript project (with Viem) </span> | ||
<span data-ty="input" data-ty-prompt="❯ Create an empty hardhat.config.js"></span> | ||
<span data-ty> Quit </span> | ||
</div> |
36 changes: 36 additions & 0 deletions
36
.snippets/code/builders/build/eth-api/dev-env/hardhat/terminal/interact.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<div id="termynal" data-termynal> | ||
<span data-ty="input">npx hardhat console --network moonbase</span> | ||
<br> | ||
<span data-ty>Welcome to Node.js v20.9.0.</span> | ||
<span data-ty>Type ".help" for more information.</span> | ||
<span data-ty="input" data-ty-prompt=">"> const Box = await ethers.getContractFactory('Box');</span> | ||
<span data-ty>undefined</span> | ||
<br> | ||
<span data-ty="input" data-ty-prompt=">"> const box = await Box.attach('0xfBD78CE8C9E1169851119754C4Ea2f70AB159289');</span> | ||
<span data-ty>undefined</span> | ||
<br> | ||
<span data-ty="input" data-ty-prompt=">"> await box.store(5);</span> | ||
<span data-ty>ContractTransactionResponse {<br> | ||
provider: HardhatEthersProvider { ... },<br> | ||
blockNumber: null,<br> | ||
blockHash: null,<br> | ||
index: undefined,<br> | ||
hash: '0x1c49a64a601fc5dd184f0a368a91130cb49203ec0f533c6fcf20445c68e20264',<br> | ||
type: 2,<br> | ||
to: '0xa84caB60db6541573a091e5C622fB79e175E17be',<br> | ||
from: '0x3B939FeaD1557C741Ff06492FD0127bd287A421e',<br> | ||
nonce: 87,<br> | ||
gasLimit: 45881n,<br> | ||
gasPrice: 1107421875n,<br> | ||
maxPriorityFeePerGas: 1n,<br> | ||
maxFeePerGas: 1107421875n,<br> | ||
data: '0x6057361d0000000000000000000000000000000000000000000000000000000000000005',<br> | ||
value: 0n,<br> | ||
chainId: 5678n,<br> | ||
signature: Signature { r: "0x9233b9cc4ae6879b7e08b9f1a4bfb175c8216eee0099966eca4a305c7f369ecc", s: "0x7663688633006b5a449d02cb08311569fadf2f9696bd7fe65417860a3b5fc57d", yParity: 0, networkV: null },<br> | ||
accessList: [],<br> | ||
blobVersionedHashes: null<br>}</span> | ||
<span data-ty="input" data-ty-prompt=">"> await box.retrieve();</span> | ||
<span data-ty>5n</span> | ||
<br> | ||
</div> |
26 changes: 26 additions & 0 deletions
26
.snippets/code/builders/build/eth-api/dev-env/hardhat/terminal/private-keys.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<div id="termynal" data-termynal> | ||
<span data-ty>Private Key: Oxdbda1821b80551c9d65939329250298aa3472ba22feea921c0cf5d620ea67b97</span> | ||
<span data-ty>Account #9: Oxa0Ee7A142d267C1f36714E4a8F75612F20a79720 (10000 ETH)</span> | ||
<span data-ty>Private Key: 0x2a871d0798f97d79848a013d4936a73bf4cc922c825d33c1cf7073dff6d409c6</span> | ||
<span data-ty>Account #10: OxBcd4042DE499D14e55001CcbB24a551F3b954096 (10000 ETH)</span> | ||
<span data-ty>Private Key: Oxf214f2b2cd398c806f84e317254e0f0b801d0643303237d97a22a48e01628897</span> | ||
<span data-ty>Account #11: 0x71bE63f3384f5fb98995898A86B02Fb2426c5788 (10000 ETH)</span> | ||
<span data-ty>Private Key: 0x701b615bbdfb9de65240bc28bd21bbc0d996645a3dd57e7b12bc2bdf6f192c82</span> | ||
<span data-ty>Account #12: OxFABBOac9d68B0B445fB7357272F202C5651694a (10000 ETH)</span> | ||
<span data-ty>Private Key: Oxa267530f49f8280200edf313ee7af6b827f2a8bce2897751d06a843f644967b1</span> | ||
<span data-ty>Account #13: 0x1CBd3b2770909D4e10f157cABC84C7264073C9Ec (10000 ETH)</span> | ||
<span data-ty>Private Key: 0x47c99abed3324a2707c28affff1267e45918ec8c3f20b8aa892e8b065d2942dd</span> | ||
<span data-ty>Account #14: OxdF3e18d64BC6A983f673Ab319CCaE4f1a5707097 (10000 ETH)</span> | ||
<span data-ty>Private Key: Oxc526ee95bf44d8fc405a158bb884d9d1238d990612e9f33d006bb0789009aaa</span> | ||
<span data-ty>Account #15: Oxcd3B766CCDd6AE721141F452C550Ca635964ce71 (10000 ETH)</span> | ||
<span data-ty>Private Key: 0x8166f546bab6da521a8369cab06c5d2b9e46670292d85c875ee9ec20e84ffb61</span> | ||
<span data-ty>Account #16: 0×2546BcD3c84621e976D8185a91A922aE77ECEc30 (10000 ETH)</span> | ||
<span data-ty>Private Key: Oxea6c44ac03bff858b476bba40716402b03e41b8e97e276d1baec7c37d42484a0</span> | ||
<span data-ty>Account #17: OxbDA5747bFD65F08deb54cb465eB87D40e51B197E (10000 ETH)</span> | ||
<span data-ty>Private Key: 0x689af8efa8c651a91ad287602527f3af2fe9f6501a7ac4b06166765a93e037fd</span> | ||
<span data-ty>Account #18: OxdD2FD4581271e230360230F9337D5c0430Bf44C0 (10000 ETH)</span> | ||
<span data-ty>Private Key: Oxde9be858da4a475276426320d5e9262ecfc3ba460bfac56360bfa6c4c28b4ee0</span> | ||
<span data-ty>Account #19: 0×8626f6940E2eb28930eFb4CeF49B2d1F2C9C1199 (10000 ETH)</span> | ||
<span data-ty>Private Key: Oxdf57089febbacf7ba0bc227dafbffa9fc08a93fdc68e1e42411a14efcf23656e</span> | ||
<span data-ty>WARNING: These accounts, and their private keys, are publicly known.<br>Any funds sent to them on Mainnet or any other live network WILL BE LOST.</span> | ||
</div> |
6 changes: 6 additions & 0 deletions
6
.snippets/code/builders/build/eth-api/dev-env/hardhat/terminal/run.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<div id="termynal" data-termynal> | ||
<span data-ty="input"><span class="file-path"></span>npx hardhat run --network moonbase scripts/set-value.js</span> | ||
<br> | ||
<span data-ty>The new value is: 2</span> | ||
<span data-ty="input"><span class="file-path"></span></span> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
.snippets/code/tutorials/eth-api/hardhat-start-to-end/terminal/compile.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<div id="termynal" data-termynal> | ||
<span data-ty="input"><span class="file-path"></span>npx hardhat compile</span> | ||
<span data-ty>Compiled 8 Solidity files successfully (evm target: paris).</span> | ||
<span data-ty="input"><span class="file-path"></span></span> | ||
</div> |
18 changes: 18 additions & 0 deletions
18
.snippets/code/tutorials/eth-api/hardhat-start-to-end/terminal/deploy-moonbase.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<div id="termynal" data-termynal> | ||
<span data-ty="input"><span class="file-path"></span> npx hardhat ignition deploy ./ignition/modules/DelegationDao.js --network moonbase --deployment-id INSERT_YOUR_NAME</span> | ||
<br> | ||
<span data-ty>✅ Confirm deploy to network moonbase (1287)? … yes</span> | ||
<span data-ty>Hardhat Ignition 🚀</span> | ||
<br> | ||
<span data-ty>Deploying [ DelegationDAOModule ]</span> | ||
<br> | ||
<span data-ty>Batch #1</span> | ||
<span data-ty>Executed DelegationDAOModule#DelegationDAO</span> | ||
<br> | ||
<span data-ty>[ DelegationDAOModule ] successfully deployed 🚀</span> | ||
<br> | ||
<span data-ty>Deployed Addresses</span> | ||
<br> | ||
<span data-ty>DelegationDAOModule#DelegationDAO - 0x69c555fE1A8D0916E6dab0629bd7530D4d2Be4D1</span> | ||
<span data-ty="input"><span class="file-path"></span></span> | ||
</div> |
18 changes: 18 additions & 0 deletions
18
.snippets/code/tutorials/eth-api/hardhat-start-to-end/terminal/deploy-moonbeam.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<div id="termynal" data-termynal> | ||
<span data-ty="input"><span class="file-path"></span> npx hardhat ignition deploy ./ignition/modules/DelegationDao.js --network moonbeam --deployment-id INSERT_YOUR_NAME</span> | ||
<br> | ||
<span data-ty>✅ Confirm deploy to network moonbeam (1284)? … yes</span> | ||
<span data-ty>Hardhat Ignition 🚀</span> | ||
<br> | ||
<span data-ty>Deploying [ DelegationDAOModule ]</span> | ||
<br> | ||
<span data-ty>Batch #1</span> | ||
<span data-ty>Executed DelegationDAOModule#DelegationDAO</span> | ||
<br> | ||
<span data-ty>[ DelegationDAOModule ] successfully deployed 🚀</span> | ||
<br> | ||
<span data-ty>Deployed Addresses</span> | ||
<br> | ||
<span data-ty>DelegationDAOModule#DelegationDAO - 0x6D895A55F5ba31e582bCEe71cae394266F240e9b</span> | ||
<span data-ty="input"><span class="file-path"></span></span> | ||
</div> |
Oops, something went wrong.