Skip to content

Commit 3f4a79e

Browse files
committed
Merge branch 'main' of github.com:0xPolygon/polygon-docs into empieichO-docs-review
2 parents f0b90bf + 1f14b84 commit 3f4a79e

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

docs/tools/matic-js/zkevm/message.md

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
This document entails customization of wrapped tokens using adapter contracts, transfer of tokens between Ethereum and Polygon zkEVM networks, and how Matic.js can be used to bridge assets from Ethereum to Polygon zkEVM and vice versa.
1+
This document shows you how to customize wrapped tokens using adapter contracts, transfer tokens between Ethereum and Polygon zkEVM networks, and how to use Matic.js to bridge assets from Ethereum to Polygon zkEVM and vice versa.
22

33
## Basic functions for error passing
44

@@ -8,7 +8,7 @@ Below we provide the two basic functions used for _error passing_ in each of the
88

99
**Message**
1010

11-
- For Root to child
11+
- From root to child
1212

1313
```jsx
1414
const bridgeTx = zkEvmClient.rootChainBridge.bridgeMessage(
@@ -37,7 +37,7 @@ const claimTx = zkEvmClient.childChainBridge.claimMessage(
3737
// proof can be found from the proof gen API
3838
```
3939

40-
- For child to root
40+
- From child to root
4141

4242
```jsx
4343
const bridgeTx = zkEvmClient.childChainBridge.bridgeMessage(
@@ -66,28 +66,25 @@ const claimTx = zkEvmClient.rootChainBridge.claimMessage(
6666
// proof can be found from the proof gen API
6767
```
6868

69-
7069
## Bridging customized ERC20 token
7170

7271
The existing zkEVM bridge uses the ERC-20 standard contract for creating wrapped tokens depending on the token's native network.
7372

74-
At often times organizations want to customise their wrapped tokens by extending some functionalities.
73+
Often, organizations want to customise their wrapped tokens by extending some functionalities.
7574

76-
For instance, these functionalities could include: blacklisting, putting a cap on minting, or any sound auxiliary functionality.
75+
These functionalities could include: blacklisting, putting a cap on minting, or any sound auxiliary functionality.
7776

7877
This can be done by deploying adapter contracts that use the messaging layer of the bridge.
7978

8079
However, for the sake of maintaining consistency among wrapped tokens, strict standards must be followed when extending their functionalities.
8180

82-
8381
## Standardizations
8482

85-
8683
1. Adapter contracts need to implement the [Polygon bridge library](https://github.com/0xPolygonHermez/code-examples/blob/main/customERC20-bridge-example/contracts/base/PolygonERC20BridgeBase.sol) and expose `bridgeToken()` and `onMessageReceived()` functions.
8784
2. There should be two separate adapter contracts; `OriginChainBridgeAdapter` and `WrapperChainBridgeAdapter`.
88-
3. `bridgeToken()` function should match the exact function signature and be similar to [this](https://github.com/maticnetwork/static/blob/master/network/mainnet/cherry/artifacts/zkevm/ZkEVMBridgeAdapter.json) ABI.
85+
3. `bridgeToken` function should match the exact function signature and be similar to [this](https://github.com/maticnetwork/static/blob/master/network/mainnet/cherry/artifacts/zkevm/ZkEVMBridgeAdapter.json) ABI.
8986

90-
**Good to have**:
87+
### Nice to have
9188

9289
Expose the following variables,
9390

0 commit comments

Comments
 (0)