Skip to content
Closed
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
24 changes: 11 additions & 13 deletions docs/build-on-morph/code-examples/1-deploy-contract-on-morph.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ keywords: [morph,ethereum,rollup,layer2,validity proof,optimistic zk-rollup]
description: Upgrade your blockchain experience with Morph - the secure decentralized, cost0efficient, and high-performing optimistic zk-rollup solution. Try it now!
---

The Morph Holesky Testnet allows anyone to deploy a smart contract on Morph. This tutorial will guide you through deploying a contract on Morph Holesky using common Ethereum development tools.
The Morph Hoodi Testnet allows anyone to deploy a smart contract on Morph. This tutorial will guide you through deploying a contract on Morph Hoodi using common Ethereum development tools.

This [demo repo](https://github.com/morph-l2/morph-examples/tree/main/contract-deployment-demos) illustrates contract deployment with [Hardhat](https://hardhat.org/) and [Foundry](https://github.com/foundry-rs/foundry).
This [demo repo](https://github.com/morph-l2/morph-examples/tree/main/contract-deployment-demos) illustrates contract deployment with [Hardhat](https://hardhat.org) and [Foundry](https://github.com/foundry-rs/foundry).

:::tip
Before you start deploying the contract, you need to request test tokens from a Holesky faucet and use the
[bridge](https://bridge-holesky.morphl2.io) to transfer some test ETH from _Holesky_ to _Morph Holesky_.
Before you start deploying the contract, you need to request test tokens from a Hoodi faucet and use the
[bridge](https://bridge-hoodi.morphl2.io) to transfer some test ETH from _Hodi_ to _Morph Hoodi_.
Comment on lines +13 to +14
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Fix naming inconsistency: "Hodi" should be "Hoodi".

Line 14 references "Hodi" while the rest of the document consistently uses "Hoodi". This appears to be a typo.

Apply this diff to fix the inconsistency:

-  [bridge](https://bridge-hoodi.morphl2.io) to transfer some test ETH from _Hodi_ to _Morph Hoodi_. 
+  [bridge](https://bridge-hoodi.morphl2.io) to transfer some test ETH from _Hoodi_ to _Morph Hoodi_. 
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
Before you start deploying the contract, you need to request test tokens from a Hoodi faucet and use the
[bridge](https://bridge-hoodi.morphl2.io) to transfer some test ETH from _Hodi_ to _Morph Hoodi_.
Before you start deploying the contract, you need to request test tokens from a Hoodi faucet and use the
[bridge](https://bridge-hoodi.morphl2.io) to transfer some test ETH from _Hoodi_ to _Morph Hoodi_.
🤖 Prompt for AI Agents
In docs/build-on-morph/code-examples/1-deploy-contract-on-morph.md around lines
13 to 14, there is a naming inconsistency where "_Hodi_" is used instead of the
correct "_Hoodi_"; update the typo so the sentence consistently reads "Hoodi"
(e.g., replace "Hodi" with "Hoodi") to match the rest of the document.


See our [Faucet](../../quick-start/3-faucet.md) for details.
:::
Expand All @@ -33,7 +33,7 @@ git clone https://github.com/morph-l2/morph-examples.git

### Install Dependencies

If you haven't already, install [nodejs](https://nodejs.org/en/download/) and [yarn](https://classic.yarnpkg.com/lang/en/docs/install).
If you haven't already, install [nodejs](https://nodejs.org/en/download) and [yarn](https://classic.yarnpkg.com/lang/en/docs/install).

```bash
cd contract-deployment-demos/hardhat-demo
Expand Down Expand Up @@ -71,7 +71,7 @@ yarn test
process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [],
}
```
Then run the following command to deploy the contract on the Morph Holesky Testnet. This will run the deployment script that set the initialing parameters, you can edit the script in scripts/deploy.ts
Then run the following command to deploy the contract on the Morph Hoodi Testnet. This will run the deployment script that set the initialing parameters, you can edit the script in scripts/deploy.ts
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Fix grammatical error: "initialing" should be "initial".

The word "initialing" is not standard English in this context. It should be "initial" (adjective) or "initialization" (noun).

Apply this diff to fix the grammar:

-Then run the following command to deploy the contract on the Morph Hoodi Testnet. This will run the deployment script that set the initialing parameters, you can edit the script in scripts/deploy.ts
+Then run the following command to deploy the contract on the Morph Hoodi Testnet. This will run the deployment script that sets the initial parameters, you can edit the script in scripts/deploy.ts

Note: Also fixed "set" → "sets" for subject-verb agreement.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
Then run the following command to deploy the contract on the Morph Hoodi Testnet. This will run the deployment script that set the initialing parameters, you can edit the script in scripts/deploy.ts
Then run the following command to deploy the contract on the Morph Hoodi Testnet. This will run the deployment script that sets the initial parameters, you can edit the script in scripts/deploy.ts
🤖 Prompt for AI Agents
In docs/build-on-morph/code-examples/1-deploy-contract-on-morph.md around line
74, fix the grammar in the sentence "This will run the deployment script that
set the initialing parameters, you can edit the script in scripts/deploy.ts" by
changing "set" to "sets" for correct subject-verb agreement and replacing
"initialing" with "initial" (or "initialization" if you prefer the noun form),
ensuring the sentence reads clearly (e.g., "...that sets the initial parameters;
you can edit the script in scripts/deploy.ts").


```bash
yarn deploy:morphTestnet
Expand All @@ -95,8 +95,8 @@ module.exports = {
network: 'morphTestnet',
chainId: 2810,
urls: {
apiURL: 'https://explorer-api-holesky.morphl2.io/api? ',
browserURL: 'https://explorer-holesky.morphl2.io/',
apiURL: 'https://explorer-api-hoodi.morphl2.io',
browserURL: 'https://explorer-hoodi.morphl2.io',
},
},
],
Expand All @@ -116,7 +116,7 @@ npx hardhat verify --network morphTestnet 0x8025985e35f1bAFfd661717f66fC5a434417
```


Once succeed, you can check your contract and the deployment transaction on [Morph Holesky Explorer](https://explorer-holesky.morphl2.io)
Once successful, you can check your contract and the deployment transaction on [Morph Hoodi Explorer](https://explorer-hoodi.morphl2.io)


## Deploy contracts with Foundry
Expand Down Expand Up @@ -175,11 +175,9 @@ Verification requires some flags passed to the normal verification script. You c
--verifier blockscout --watch
```

Once succeeded, you can check your contract and the deployment transaction on [Morph Holesky Explorer](https://explorer-holesky.morphl2.io).
Once successful, you can check your contract and the deployment transaction on [Morph Hoodi Explorer](https://explorer-hoodi.morphl2.io).


## Questions and Feedback

Thank you for participating in and developing on the Morph Holesky Testnet! If you encounter any issues, join our [Discord](https://discord.com/invite/MorphLayer) and find us at #dev-support channel.


Thank you for participating in and developing on the Morph Hoodi Testnet! If you encounter any issues, join our [Discord](https://discord.com/invite/MorphLayer) and find us at #dev-support channel.