Skip to content

Commit

Permalink
fix: several typos in the documentation (#140)
Browse files Browse the repository at this point in the history
* fix typos scroll-messenger-cross-chain-interaction.mdx

* fix typos enforced-transactions.mdx

* fix typo erc1155-token-bridge.mdx

* fix typo ethereum-and-scroll-differences.mdx

* fix typo makeComponentNode.ts

* fix typos link-to-wallet.ts

* fix typo button.css
  • Loading branch information
tudorpintea999 authored Dec 13, 2023
1 parent 6815706 commit 50ce2a3
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion integrations/utils/makeComponentNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export function makeComponentNode(
type: "mdxJsxFlowElement",
name,
attributes: Object.entries(attributes)
// Filter out non-truthy attributes to avoid empty attrs being parsed as `true`.
// Filter out non-truthy attributes to avoid empty attributes being parsed as `true`.
.filter(([_k, v]) => v !== false && Boolean(v))
.map(([name, value]) => ({
type: "mdxJsxAttribute",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ type StateAccount struct {

Related to this, we maintain two types of codehash for each contract bytecode: Keccak hash and Poseidon hash.

`KeccakCodeHash` is kept to maintain compatibility for `EXTCODEHASH`. `PoseidonCodeHash` is used for verifying correctness of bytecodes loaded in the zkEVM, where Poseidon hashing is far more efficient.
`KeccakCodeHash` is kept to maintain compatibility for `EXTCODEHASH`. `PoseidonCodeHash` is used for verifying the correctness of bytecodes loaded in the zkEVM, where Poseidon hashing is far more efficient.

### CodeSize

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,10 @@ We pass the message by executing `executeFunctionCrosschain` and passing the fol
- If you deployed it on Sepolia use `0x50c7d3e7f7c656493D1D76aaa1a836CedfCBB16A`. If you deployed on Scroll use `0xBa50f5340FB9F3Bd074bD638c9BE13eCB36E603d`.
- `targetAddress`: The address of the `Greeter` contract on the opposite chain.
- `value`: In this case, it is `0` because the `setGreeting`is not payable.
- `greeting`: This is the parameter that will be sent through the message. Try passing `“This message was crosschain!”`
- `greeting`: This is the parameter that will be sent through the message. Try passing `“This message was cross-chain!”`
- `gasLimit`:
- If you are sending the message from L1 to L2, around `5000` gas limit should be more than enough.
- If you are sending the message from L2 to L1, pass `0`, as the transaction be completed by executing an additional transaction on L1.
- If you are sending the message from L2 to L1, pass `0`, as the transaction to be completed by executing an additional transaction on L1.

### Relay the Message when sending from L2 to L1

Expand Down Expand Up @@ -117,6 +117,6 @@ in the [Scroll Messenger](/developers/l1-and-l2-bridging/the-scroll-messenger) a
applications and users.
</Aside>

After executing and confirming the transaction on both L1 and L2, the new state of `greeting` on the `Greeter` contract should be `“This message was crosschain!”`. Sending a message from one chain to the other should take around 20 minutes after the transactions are confirmed on the origin chain.
After executing and confirming the transaction on both L1 and L2, the new state of `greeting` on the `Greeter` contract should be `“This message was cross-chain!”`. Sending a message from one chain to the other should take around 20 minutes after the transactions are confirmed on the origin chain.

Congratulations, you now executed a transaction from one chain to the other using our native bridge!
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ Add an enforced transaction to L2 from an EOA account sender.

| Parameter | Description |
| ---------- | ---------------------------------------------------------- |
| \_target | The address of target contract to call in L2. |
| \_target | The address of the target contract to call in L2. |
| \_value | The value passed. |
| \_gasLimit | The maximum gas should be used for this transaction in L2. |
| \_data | The calldata passed to target contract. |
| \_data | The calldata passed to the target contract. |

### sendTransaction

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ ERC1155 bridging from L1 to L2 is done via the L1ERC1155Gateway. Similarly to ER

<Aside type="tip" title="">
**`depositERC1155`** is a payable function, and the amount of ETH sent to this function will be used to pay for L2
fees. If the amount is not enough, the transaction will not be sent. All excess eth will be sent back to sender.
fees. If the amount is not enough, the transaction will not be sent. All excess eth will be sent back to the sender.
`0.00001 ETH` should be more than enough to process a token deposit.
</Aside>

Expand Down
4 changes: 2 additions & 2 deletions src/scripts/link-to-wallet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ const addChainToWallet = async (chainId: string, ethereum: MetaMaskInpageProvide
}

/**
* Functions which validates the format of Link address and interfacs with the contract to make sure
* Functions which validates the format of Link address and interacts with the contract to make sure
* its metadata (e.g.: symbol) is valid
* @param address
* @param provider
Expand Down Expand Up @@ -246,7 +246,7 @@ try {
}

// Detect when user initiates the chain switch from the webapp
// variable chainFromSwitch used to diffenrentiate when user switch the chain
// variable chainFromSwitch used to differentiate when user switch the chain
// directly from wallet
let chainFromSwitch: string
window.addEventListener(initChainChangeEventName, (evt: any) => {
Expand Down
2 changes: 1 addition & 1 deletion src/styles/design-system/components/button.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* These are the styles that will be applied for all buttons globally.
* We want thse styles to be minimal, because our buttons can differ greatly,
* We want these styles to be minimal, because our buttons can differ greatly,
* e.g. modal close button may not share styles with primary button.
*/
button {
Expand Down

0 comments on commit 50ce2a3

Please sign in to comment.