Skip to content

Move Solana deposit/depositAndCall tasks from Localnet to the Toolkit #228

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

Closed
fadeev opened this issue Feb 28, 2025 · 4 comments
Closed
Assignees

Comments

@fadeev
Copy link
Member

fadeev commented Feb 28, 2025

Right now we have Solana deposit/depositAndCall both in Localnet and in the Toolkit.

We need to move this functionality into the Toolkit, so that there is no duplication of logic.

Solana Toolkit functions should:

  • Be compatible with Localnet, testnet (devnet) and mainnet. For example, it should intelligently get the correct Gateway address. On Localnet it's easier to pass Gateway address as a CLI argument, for testnet/mainnet Gateway address should be read from the protocol contracts JSON.
  • Accept both SPL and SOL.
  • Callable both from CLI (for example, Hardhat task) as well as from the frontend. Here's a quick and dirty example of how existing Toolkit Solana functions can be called from the browser.

Examples should be updated to use Toolkit Solana functions (right now they're using Solana functions from Localnet).

@hernan-clich hernan-clich self-assigned this Feb 28, 2025
@fadeev
Copy link
Member Author

fadeev commented Feb 28, 2025

@hernan-clich this PR #222 has to be merged before working on this issue.

@fadeev
Copy link
Member Author

fadeev commented Feb 28, 2025

As we're probably going to be moving away from using Hardhat as a task runner, it would be great to move as much functionality as possible from tasks into client/src/solanaDeposit*.ts.

@fadeev
Copy link
Member Author

fadeev commented Mar 11, 2025

We should consider using Anchor TS client generator https://coral-xyz.github.io/anchor/ts/index.html instead of directly calling the Gateway.

@fadeev fadeev linked a pull request May 8, 2025 that will close this issue
@fadeev
Copy link
Member Author

fadeev commented May 17, 2025

@fadeev fadeev closed this as completed May 17, 2025
@fadeev fadeev removed a link to a pull request May 19, 2025
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

No branches or pull requests

2 participants