You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/pos/get-started/building-on-polygon.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,9 +4,9 @@ comments: true
4
4
5
5
Ethereum developers are by default Polygon developers. Welcome. Simply switch to the [Polygon RPC](https://polygon-rpc.com/) and get started. All familiar tools used on Ethereum are supported on Polygon. Whether it is Truffle, Remix or Web3.js, Polygon offers the same UX as Ethereum.
6
6
7
-
Connect your wallet and deploy any decentralized application to either Polygon Mainnet or Polygon Mumbai Testnet.
7
+
Connect your wallet and deploy any decentralized application to either PoS mainnet or Amoy testnet.
8
8
9
-
Polygon Mumbai Testnet connects to Ethereum Goërli Testnet, which acts as its ParentChain, a testnet layer 1 (L1).
9
+
Polygon Amoy testnet connects to Ethereum Sepolia testnet, which acts as its parent chain, a testnet layer 1 (L1).
10
10
11
11
Find all the network-related details in the [network documentation](../reference/rpc-endpoints.md).
Copy file name to clipboardExpand all lines: docs/pos/governance/governance-fundamentals.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -49,7 +49,7 @@ Assuming that the change or upgrade agreed upon via community consensus requires
49
49
1. The protocol decision is made on a PPGC, and implementation begins in the form of modifications to the relevant GitHub repositories.
50
50
2. Core developers create pull requests containing the changes, which can then be merged into the respective code base, and a new [tag](https://github.com/maticnetwork/bor/tags) is created.
51
51
3. Core developers test new releases by deploying them on local devnets. If everything continues to function normally, the tag is marked as "**beta**", which is essentially the "**pre-release**" state.
52
-
4. The modifications and upgrades are rolled out to the Mumbai testnet, and left out to soak for at least one week. Currently, the [Mumbai Testing Committee](https://forum.polygon.technology/t/introducing-mumbai-testing-committee/12970) reports on the stability of the release in the PPGC.
52
+
4. The modifications and upgrades are rolled out to the Amoy testnet, and left out to soak for at least one week. Currently, the Amoy Testing Committee reports on the stability of the release in the PPGC.
53
53
5. Finally, once confirmed that the upgrade doesn't break anything, it is scheduled to be released to mainnet on a PPGC. At this point, the tag version is marked as "**final**".
54
54
6. Validators upgrade their nodes to the latest version after considering the changes. The upgrade is now made canonical via on-chain consensus of the validating stake, including that delegated by token holders.
Copy file name to clipboardExpand all lines: docs/pos/how-to/bridging/ethereum-polygon/ethereum-to-matic.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,15 +12,15 @@ The Sender and Receiver contract are required to be mapped on Ethereum — [Stat
12
12
13
13
---
14
14
15
-
In the following walkthrough, we'll be deploying a Sender contract on Goerli (Ethereum testnet) and a Receiver contract on Mumbai (Polygon's testnet) and then we'll be sending data from Sender and reading data on Receiver via web3 calls in a node script.
15
+
In the following walkthrough, we'll be deploying a Sender contract on Sepolia (Ethereum testnet) and a Receiver contract on Amoy (Polygon testnet). Then, we'll be sending data from Sender and reading data on Receiver via web3 calls in a node script.
16
16
17
17
### 1. Deploy Sender contract
18
18
19
19
The sole purpose of Sender contract is to be able to call [syncState](https://github.com/maticnetwork/contracts/blob/e999579e9dc898ab6e66ddcb49ee84c2543a9658/contracts/root/stateSyncer/StateSender.sol#L33) function on the StateSender contract — which is Matic's state syncer contract - the StateSynced event of which Heimdall is listening to.
20
20
21
21
Deployed at:
22
22
23
-
`0xEAa852323826C71cd7920C3b4c007184234c3945` on Goerli
23
+
`0x49E307Fa5a58ff1834E0F8a60eB2a9609E6A5F50` on Sepolia
24
24
25
25
`0x28e4F3a7f651294B9564800b2D01f35189A5bFbE` on Ethereum Mainnet
26
26
@@ -48,7 +48,7 @@ function sendState(bytes calldata data) external {
48
48
}
49
49
```
50
50
51
-
In the above function, `stateSenderContract` is the address of the StateSender on the network you'll be deploying `Sender` on. (eg., we'll be using `0xEAa852323826C71cd7920C3b4c007184234c3945` for Goerli), and `receiver` is the contract that will receive the data we send from here.
51
+
In the above function, `stateSenderContract` is the address of the StateSender on the network you'll be deploying `Sender` on. (eg., we'll be using `0x49E307Fa5a58ff1834E0F8a60eB2a9609E6A5F50` for Sepolia), and `receiver` is the contract that will receive the data we send from here.
52
52
53
53
It is recommended to use constructors to pass in variables, but for the purpose of this demo, we'll simply hardcode these two addresses:
54
54
@@ -113,7 +113,7 @@ contract receiver {
113
113
114
114
The function simply assigns the last received State Id and data to variables. [StateId](https://github.com/maticnetwork/contracts/blob/239a91045622ddcf9ebec2cec81fdc6daa3a33e3/contracts/root/stateSyncer/StateSender.sol#L36) is a simple unique reference to the transferred state (a simple counter).
115
115
116
-
Deploy your Receiver.sol on Polygon's testnet and keep a note of the address and ABI
116
+
Deploy your `Receiver.sol` to Amoy testnet and keep a note of the address and ABI
117
117
118
118
### 3. Getting your Sender and Receiver mapped
119
119
@@ -133,7 +133,7 @@ We'll first initialise our web3 objects, wallet to make the transactions and con
Copy file name to clipboardExpand all lines: docs/pos/how-to/bridging/ethereum-polygon/index.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
Polygon brings you a trustless two-way transaction channel between Polygon PoS and Ethereum by introducing the cross-chain bridge. The official bridge allows you to transfer tokens between Ethereum and Polygon PoS without incurring third-party risks and market liquidity limitations.
2
2
3
-
The official bridge is available on both Mumbai Testnet as well as Polygon PoS Mainnet, and provides a near-instant, low-cost, and flexible bridging option for both users and dApp developers. You can access it and bridge assets from Ethereum over to Polygon PoS using [Polygon Portal](https://portal.polygon.technology).
3
+
The official bridge is available on both PoS Amoy testnet as well as mainnet, and provides a near-instant, low-cost, and flexible bridging option for both users and dApp developers. You can access it and bridge assets from Ethereum over to Polygon PoS using [Polygon Portal](https://portal.polygon.technology).
Copy file name to clipboardExpand all lines: docs/pos/how-to/bridging/ethereum-polygon/matic-to-ethereum.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ comments: true
4
4
5
5
Mechanism for transferring data from Polygon to Ethereum is a little different from doing the same for Ethereum to Polygon. The **checkpoint** transactions created by the Validators on the Ethereum chain are used for achieving this. Basically a transaction is initially created on Polygon. While creating this transaction it has to be ensured that an **event is emitted** and the **event logs includes the data we wish to transfer** from Polygon to Ethereum.
6
6
7
-
In a period of time ( about 10-30 mins ), this transaction is check-pointed on the Ethereum chain by the validators. Once checkpointing is done, the hash of the transaction created on the Polygon chain can be submitted as a proof on the **RootChainManager** contract on the Ethereum chain. This contract, validates the transaction, verifies that this transaction is included in the checkpoint and finally decodes the event logs from this transaction.
7
+
Within a timeframe of approximately 10 to 30 minutes, this transaction is check-pointed on the Ethereum chain by the validators. Once checkpointing is complete, the hash of the transaction created on the Polygon chain can be submitted as a proof on the **RootChainManager** contract on the Ethereum chain. This contract, validates the transaction, verifies that this transaction is included in the checkpoint and finally decodes the event logs from this transaction.
8
8
9
9
Once this phase is over, we can use the **decoded event log data to perform any change** on the root contract deployed on the Ethereum chain. For this we also need to ensure that, the change of state on Ethereum is only done in a secure way. Hence, we make use of a **Predicate** contract which is a special type of contract that can be only triggered by the **RootChainManager** contract. This architecture ensures that the state changes on Ethereum happens only when the transaction on Polygon is check pointed and verified on the Ethereum chain by the **RootChainManager** contract.
Copy file name to clipboardExpand all lines: docs/pos/how-to/bridging/l1-l2-communication/state-transfer.md
+20-19Lines changed: 20 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,43 +27,44 @@ Use the `FxBaseChildTunnel` contract from [here](https://github.com/jdkanani/fx-
27
27
28
28
- You need to inherit `FxBaseRootTunnel` contract in your root contract on Ethereum. As an example, you can follow this [contract](https://github.com/jdkanani/fx-portal/blob/main/contracts/examples/state-transfer/FxStateRootTunnel.sol) . Similarly, inherit `FxBaseChildTunnel` contract in your child on Polygon. Follow this [contract](https://github.com/jdkanani/fx-portal/blob/main/contracts/examples/state-transfer/FxStateChildTunnel.sol) as an example.
29
29
- While deploying your root contract on
30
-
-**Goerli Testnet**, pass the address of `_checkpointManager` as **0x2890bA17EfE978480615e330ecB65333b880928e** and `_fxRoot` as **0x3d1d3E34f7fB6D26245E6640E1c50710eFFf15bA**.
30
+
-**Sepolia testnet**, pass the address of `_checkpointManager` as **0xbd07D7E1E93c8d4b2a261327F3C28a8EA7167209** and `_fxRoot` as **0x0E13EBEdDb8cf9f5987512d5E081FdC2F5b0991e**.
31
31
32
32
-**Ethereum Mainnet**, `_checkpointManager` is **0x86e4dc95c7fbdbf52e33d563bbdb00823894c287** and `_fxRoot` is **0xfe5e5D361b2ad62c541bAb87C45a0B9B018389a2**.
33
-
- For deploying the child contract on **Mumbai testnet**, pass **0xCf73231F28B7331BBe3124B907840A94851f9f11** as `_fxChild` in constructor. For **Polygon mainnet,**`_fxChild` will be **0x8397259c983751DAf40400790063935a11afa28a**.
34
-
- Call `setFxChildTunnel` on deployed root tunnel with the address of child tunnel. Example: [0x79cd30ace561a226258918b56ce098a08ce0c70707a80bba91197f127a48b5c2](https://goerli.etherscan.io/tx/0x79cd30ace561a226258918b56ce098a08ce0c70707a80bba91197f127a48b5c2)
35
-
- Call `setFxRootTunnel` on deployed child tunnel with address of root tunnel. Example: [0xffd0cda35a8c3fd6d8c1c04cd79a27b7e5e00cfc2ffc4b864d2b45a8bb7e98b8](https://mumbai.polygonscan.com/tx/0xffd0cda35a8c3fd6d8c1c04cd79a27b7e5e00cfc2ffc4b864d2b45a8bb7e98b8/internal-transactions)
33
+
- For deploying the child contract on **Amoy testnet**, pass **0xE5930336866d0388f0f745A2d9207C7781047C0f** as `_fxChild` in constructor. For **Polygon mainnet,**`_fxChild` will be **0x8397259c983751DAf40400790063935a11afa28a**.
34
+
- Call `setFxChildTunnel` on deployed root tunnel with the address of child tunnel. Example: [0x97482d379e397329ac1ee2a34eeb9aceb06bd4a91ec17c7d7d3da4a1e96c165c](https://sepolia.etherscan.io/tx/0x97482d379e397329ac1ee2a34eeb9aceb06bd4a91ec17c7d7d3da4a1e96c165c)
35
+
- Call `setFxRootTunnel` on deployed child tunnel with address of root tunnel. Example: [0xae30445301bd7c902bf373fb890faf5658bd3a9437131c9408d5ecbc41af3fc0](https://amoy.polygonscan.com/tx/0xae30445301bd7c902bf373fb890faf5658bd3a9437131c9408d5ecbc41af3fc0)
- You need to call `_sendMessageToChild()` internally in your root contract and pass the data as an argument to be sent to Polygon. Example: [0x28705fcae757a0c88694bd167cb94a2696a0bc9a645eb4ae20cff960537644c1](https://goerli.etherscan.io/tx/0x28705fcae757a0c88694bd167cb94a2696a0bc9a645eb4ae20cff960537644c1)
45
+
- You need to call `_sendMessageToChild()` internally in your root contract and pass the data as an argument to be sent to Polygon. Example: [0x00a1aa71593fec825b4b1ce1081b5a9848612fb21f9e56def2914b483f5f34f5](https://sepolia.etherscan.io/tx/0x00a1aa71593fec825b4b1ce1081b5a9848612fb21f9e56def2914b483f5f34f5)
46
46
- In your child contract, implement `_processMessageFromRoot()` virtual function in `FxBaseChildTunnel` to retrieve data from Ethereum. The data will be received automatically from the state receiver when the state is synced.
47
47
48
48
## State Transfer from Polygon → Ethereum
49
49
50
-
1. Call `_sendMessageToRoot()` internally in your child contract with data as a parameter to be sent to Ethereum. Example: [0x3cc9f7e675bb4f6af87ee99947bf24c38cbffa0b933d8c981644a2f2b550e66a](https://mumbai.polygonscan.com/tx/0x3cc9f7e675bb4f6af87ee99947bf24c38cbffa0b933d8c981644a2f2b550e66a/logs)
50
+
1. Call `_sendMessageToRoot()` internally in your child contract with data as a parameter to be sent to Ethereum. Note down the transaction hash as it will be used to generate the proof after the transaction has been included as a checkpoint.
51
51
52
-
Note the transaction hash as it will be used to generate proof after it has been included as a checkpoint.
52
+
2.**Proof Generation to complete the exit on root chain**: Generate the proof using the **tx hash** and **MESSAGE_SENT_EVENT_SIG**. To generate the proof, you can either use the proof generation API hosted by Polygon, or you can also spin up your own proof generation API by following the instructions [here](https://github.com/maticnetwork/proof-generation-api).
53
53
54
-
2.**Proof Generation to complete the exit on root chain**: Generate the proof using the **tx hash** and **MESSAGE_SENT_EVENT_SIG**. To generate the proof, you can either use the proof generation API hosted by Polygon or you can also spin up your own proof generation API by following the instructions [here](https://github.com/maticnetwork/proof-generation-api).
54
+
The proof generation endpoint hosted by Polygon is available here:
The proof generation endpoint hosted by Polygon is available [here](https://proof-generator.polygon.technology/api/v1/matic/exit-payload/{burnTxHash}?eventSignature={eventSignature}).
59
+
Here,
57
60
58
-
- `burnTxHash` is the transaction hash of the `_sendMessageToRoot()` transaction you initiated on Polygon.
59
-
- `eventSignature` is the event signature of the event emitted by the `_sendMessageToRoot()` function. The event signature for the MESSAGE_SENT_EVENT_SIG is `0x8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036`.
61
+
-`burnTxHash` is the transaction hash of the `_sendMessageToRoot()` transaction you initiated on Polygon.
62
+
-`eventSignature` is the event signature of the event emitted by the `_sendMessageToRoot()` function. The event signature for the MESSAGE_SENT_EVENT_SIG is `0x8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036`.
60
63
61
-
The proof generation API usage examples for the Mainnet and Testnet are as follows:-
3. Implement `_processMessageFromChild()` in your root contract.
68
+
1. Implement `_processMessageFromChild()` in your root contract.
68
69
69
-
4. Use the generated proof as an input to `receiveMessage()` to retrieve data sent from child tunnel into your contract. Example: [0x436dcd500659bea715a09d9257295ddc21290769daeea7f0b666166ef75e3515](https://goerli.etherscan.io/tx/0x436dcd500659bea715a09d9257295ddc21290769daeea7f0b666166ef75e3515) )
70
+
2. Use the generated proof as an input to `receiveMessage()` to retrieve data sent from child tunnel into your contract.
0 commit comments