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

update gmp example dest chain to base-sepolia #149

Merged
merged 3 commits into from
Jun 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion dictionary.txt
Original file line number Diff line number Diff line change
Expand Up @@ -465,4 +465,5 @@ incentivization
domainID
caip2
caip19
optionalities
optionalities
Base-Sepolia
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ draft: false

### GMP Example With A Simple Storage Contract

In the following example, we will use the `TESTNET` environment to pass a generic message from Ethereum Sepolia to Cronos Testnet using a simple storage contract. Specifically, the `deposit` method will be called on Sepolia, passing the details of the function to be called (the `store` function, or function signature `0xa271ced2`) on a smart contract deployed on Cronos ([0xcb9eb2b2abbd51945a82f77e789c26720b3835bf](https://explorer.cronos.org/testnet/address/0xcb9eb2b2abbd51945a82f77e789c26720b3835bf)). The method will encode the current UNIX timestamp as the payload to be passed and stored in the destination chain contract. The data can be read by calling the `retrieve` function on the destination chain contract by querying the depositor address derived from the private key.
In the following example, we will use the `TESTNET` environment to pass a generic message from Ethereum Sepolia to Base-Sepolia Testnet using a simple storage contract. Specifically, the `deposit` method will be called on Sepolia, passing the details of the function to be called (the `store` function, or function signature `0xa271ced2`) on a smart contract deployed on Base-Sepolia ([0x669f52487ffa6f9abf722082f735537a98ec0e4b](https://sepolia.basescan.org/address/0x669f52487ffa6f9abf722082f735537a98ec0e4b)). The method will encode the current UNIX timestamp as the payload to be passed and stored in the destination chain contract. The data can be read by calling the `retrieve` function on the destination chain contract by querying the depositor address derived from the private key.

This is an example script that demonstrates the functionality of the Sygma SDK and the wider Sygma ecosystem of relayers and bridge and handler contracts. The complete example can be found in this [repo](
https://github.com/sygmaprotocol/sygma-sdk/tree/main/examples/evm-to-evm-generic-mesage-passing).
Expand Down Expand Up @@ -79,7 +79,7 @@ cd examples/evm-to-evm-generic-mesage-passing
yarn run transfer
```

The example will use `ethers` in conjunction with the sygma-sdk to call a function on a smart contract on Cronos by calling the `Deposit` method on Sepolia and passing the details of the function to be called.
The example will use `ethers` in conjunction with the sygma-sdk to call a function on a smart contract on Base-Sepolia by calling the `Deposit` method on Sepolia and passing the details of the function to be called.

Replace the placeholder values in the `.env` file with your own Ethereum wallet private key and provider URL.

Loading