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

fix: add context on when to use createAddress and create2Address #1032

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -944,8 +944,8 @@ export default async function (hre: HardhatRuntimeEnvironment) {
:::tip

- zkSync has different address derivation rules from Ethereum.
- Always use the [`createAddress`](../../../sdks/js/utils.md#createaddress) and [`create2Address`](../../../sdks/js/utils.md#create2address) utility functions of the `zksync-ethers` SDK.
- Read the documentation for more information on [address derivation differences between Ethereum and zkSync](../../../developer-reference/differences-with-ethereum.md).
- Always use the [`createAddress`](../../../sdks/js/utils.md#createaddress) and [`create2Address`](../../../sdks/js/utils.md#create2address) utility functions of the `zksync-ethers` SDK when looking to determine a contract's address.
- Read the documentation for more information on [address derivation differences between Ethereum and zkSync](<[../../../developer-reference/differences-with-ethereum.md](https://docs.zksync.io/build/developer-reference/differences-with-ethereum.html#create-create2)>).
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- Read the documentation for more information on [address derivation differences between Ethereum and zkSync](<[../../../developer-reference/differences-with-ethereum.md](https://docs.zksync.io/build/developer-reference/differences-with-ethereum.html#create-create2)>).
- Read the documentation for more information on [address derivation differences between Ethereum and zkSync](<[../../../developer-reference/differences-with-ethereum.md](https://docs.zksync.io/build/developer-reference/differences-with-ethereum.md#create-create2)>).

this breaks the CI job 😉

Copy link
Collaborator

Choose a reason for hiding this comment

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

We should be adding links directly to the header within the Markdown file and not use reference links (especially when this is already a link)

Suggested change
- Read the documentation for more information on [address derivation differences between Ethereum and zkSync](<[../../../developer-reference/differences-with-ethereum.md](https://docs.zksync.io/build/developer-reference/differences-with-ethereum.html#create-create2)>).
- Read the documentation for more information on [address derivation differences between Ethereum and zkSync](../../../developer-reference/differences-with-ethereum.md#create-create2).

:::

### Start a Transaction from the Account
Expand Down