Ted Palmer pfp
Ted Palmer
@tedpalmer
Relay isn’t just for bridging, you can perform any transaction cross-chain. @viem's simulateContract method makes this super simple. Check out this example 🔽
1 reply
0 recast
0 reaction

Ted Palmer pfp
Ted Palmer
@tedpalmer
Step 1: Set up a Relay Client
1 reply
0 recast
0 reaction

Ted Palmer pfp
Ted Palmer
@tedpalmer
Step 2: Initialize a viem public client
1 reply
0 recast
0 reaction

Ted Palmer pfp
Ted Palmer
@tedpalmer
Step 3: Use viem’s simulateContract method on any smart contract method to retrieve the request data
1 reply
0 recast
0 reaction

Ted Palmer pfp
Ted Palmer
@tedpalmer
Step 4: Pass the request object returned above into the call action
1 reply
0 recast
0 reaction

Ted Palmer pfp
Ted Palmer
@tedpalmer
Learn more about Relay here: https://docs.relay.link/what-is-relay
0 reply
0 recast
0 reaction