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

add eth-weth example to readme #53

Merged
merged 8 commits into from
Oct 30, 2024
Merged

Conversation

gsteenkamp89
Copy link
Collaborator

@gsteenkamp89 gsteenkamp89 commented Oct 24, 2024

closes ACX-3033

Copy link

changeset-bot bot commented Oct 24, 2024

⚠️ No Changeset found

Latest commit: 8360de1

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

vercel bot commented Oct 24, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
toolkit-example ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 29, 2024 10:37am

Comment on lines -140 to -150
export function generateStakeAction(
userAddress: Address,
value: bigint,
): CrossChainAction {
return {
target: STAKE_CONTRACT.address,
callData: generateStakeCallData(userAddress),
value,
};
}

Copy link
Collaborator Author

@gsteenkamp89 gsteenkamp89 Oct 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

deleting unused function


> This follows the logic in the example app.

To implement this feature, we need to bridge either ETH or WETH from our origin chain to our destination chain. Across will always send WETH to the recipient on the destination chain, **unless the recipient is an EOA**. For our use-case, we want to stake native ETH, moreover we want to do this in one step. For this we recommend using Across's MulticallHandler contract (or deploying your own).
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please check this information is accurate

Copy link
Collaborator

@dohaki dohaki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It does feel a bit verbose now 🤔 I think it might be better to either change the example app to support USDC or rewrite the guide section in the README to mirror only the example app. wdyt?

@gsteenkamp89
Copy link
Collaborator Author

It does feel a bit verbose now 🤔 I think it might be better to either change the example app to support USDC or rewrite the guide section in the README to mirror only the example app. wdyt?

Yeah I agree this is too verbose. The example app uses eth/weth precisely because it can be a confusing implementation since you have to update calldata AND value when building your cross-chain actions. So maybe it does make sense to just use that example int he README?

@dohaki
Copy link
Collaborator

dohaki commented Oct 24, 2024

It does feel a bit verbose now 🤔 I think it might be better to either change the example app to support USDC or rewrite the guide section in the README to mirror only the example app. wdyt?

Yeah I agree this is too verbose. The example app uses eth/weth precisely because it can be a confusing implementation since you have to update calldata AND value when building your cross-chain actions. So maybe it does make sense to just use that example int he README?

Yeah, agree let's do that. In future iterations, we can add other examples as well.

@gsteenkamp89 gsteenkamp89 marked this pull request as ready for review October 29, 2024 10:31
@gsteenkamp89 gsteenkamp89 requested a review from dohaki October 29, 2024 10:31
Copy link

linear bot commented Oct 29, 2024

@gsteenkamp89 gsteenkamp89 merged commit 8b3a8e9 into master Oct 30, 2024
3 checks passed
@gsteenkamp89 gsteenkamp89 deleted the chore/expand-docs-example branch October 30, 2024 08:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants