Skip to content

Commit

Permalink
feat(svm): shorten svm chain ids (#817)
Browse files Browse the repository at this point in the history
Signed-off-by: Pablo Maldonado <[email protected]>
  • Loading branch information
md0x authored Jan 13, 2025
1 parent 3888d71 commit b5aa2d1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/svm/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { ethers } from "ethers";
*/
export const getSolanaChainId = (cluster: "devnet" | "mainnet"): BigNumber => {
return BigNumber.from(
BigInt(ethers.utils.keccak256(ethers.utils.toUtf8Bytes(`solana-${cluster}`))) & BigInt("0xFFFFFFFFFFFFFFFF")
BigInt(ethers.utils.keccak256(ethers.utils.toUtf8Bytes(`solana-${cluster}`))) & BigInt("0xFFFFFFFFFFFF")
);
};

Expand Down

0 comments on commit b5aa2d1

Please sign in to comment.