Creating a token account from Solana Proxy Account for each x-chain users.
For any tokens to migrate from evm chain to solana chain a user must have an existing token account in solana chain. This is becuase, every token has separate associated token account and a user may own many token account. An associated token account address is derived from the token mint address, user wallet address and token program id.
Rest of work is performed by the relayer. If you want to manually relay the payloads to solana, you can accomplish it in following way.
constpayerAddress=wallet.publicKey.toString();constbridgeAddress=getBridgeAddressForChain(targetChain);constvaaBuf=Buffer.from(vaaBytes);setDefaultWasm("node"); // use bundler for browser// posting vaa in solanaawaitpostVaaSolanaWithRetry( connection,wallet.signTransaction, bridgeAddress, payerAddress, vaaBuf,MAX_VAA_UPLOAD_RETRIES_SOLANA,);
Then you parse payload information from vaa and call method in Zebec Solana bridge program to initialize token account in solana.