-
Notifications
You must be signed in to change notification settings - Fork 37
deep link to portal bridge
What if I want to share a link on social media or to a friend, and I want a pre-selection of source-chain and target-chain?
To do that we support two ways to do it:
You can use a URL with the following format https://www.portalbridge.com/<target-chain>/from/<source-chain>
, this will re-write the request to a query param URL, see below.
re-write is transparent
Examples:
- https://www.portalbridge.com/bsc/from/arbitrum
- https://www.portalbridge.com/aptos/from/near
- https://www.portalbridge.com/sui/from/ethereum
You can use a URL with the following query params https://www.portalbridge.com/#/transfer?sourceChain=<source-chain>&targetChain=<target-chain>
.
Examples:
- https://www.portalbridge.com/#/transfer?sourceChain=bsc&targetChain=arbitrum
- https://www.portalbridge.com/#/transfer?sourceChain=near&targetChain=aptos
- https://www.portalbridge.com/#/transfer?sourceChain=ethereum&targetChain=sui
You could use any of the chain names listed here
Yes, you can also use ids from here.
Examples:
-
https://www.portalbridge.com/#/transfer?sourceChain=bsc&targetChain=arbitrum
-
https://www.portalbridge.com/#/transfer?sourceChain=4&targetChain=23
where:
- id 4 is for bsc, see https://github.com/wormhole-foundation/wormhole/blob/main/sdk/js/src/utils/consts.ts#L6
- id 23 is for arbitrum, see https://github.com/wormhole-foundation/wormhole/blob/main/sdk/js/src/utils/consts.ts#L25
Asset pre-selection is not yet supported.