Skip to main content
This guide demonstrates transferring a uint256 value from Polygon Chain to Ethereum. The same approach applies to any data type: encode the data as bytes, emit it from the child contract, then decode it in the root contract after checkpoint verification. For background on the checkpoint and predicate mechanism, see the state sync architecture docs.
The contracts in this guide are simplified illustrations. Do not deploy them to production without a thorough security review and audit appropriate for your use case.

Implementation

The full contract source and exit script for this example are available in the matic-learn-pos repository.