For the complete documentation index, see llms.txt. This page is also available as Markdown.

Configuration

Staking widget configuration

The configuration of this widget is almost the same as the Swap widget. Take a look at these docs:

In addtion to the standard widget config, the staking widget requires a stakeConfig.

Working example

https://github.com/0xsquid/widget-integrations/blob/main/packages/next-app/pages/staking.tsx

Adding the Staking transactions

Basically the stakeConfig is here to tell the widget what happens after the cross chain swap.

Here's an example flow:

  • User wants to stake USDC on Moonbeam from BNB on Binance

  • Normal cross chain swap happens with Squid (swap to axlUSDC, bridge, swap to destination token, configured by the developer)

  • Now it's time to execute customContractCalls:

    • Give approval to SquidMultiCall to send dest token (let's say GLMR received earlier)

    • Effectively stake this amount on Moonbeam

    • Send staked token to user

The main attribute to update is customContractCalls.

You can read more about the configuration of customContractCalls here: Hooks

stakeConfig structure

Last updated