Skip to content

Commit

Permalink
chore(examples): fix lynx example using wrong chain id
Browse files Browse the repository at this point in the history
  • Loading branch information
piotr-roslaniec committed Jul 5, 2024
1 parent 1ce725c commit cc82237
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion examples/taco/nodejs/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,12 @@ if (!consumerPrivateKey) {
const domain = process.env.DOMAIN || domains.TESTNET;
const ritualId = parseInt(process.env.RITUAL_ID || '0');
const provider = new ethers.providers.JsonRpcProvider(rpcProviderUrl);
const chainId = domain === domains.TESTNET ? 80002 : 137;
const CHAIN_ID_FOR_DOMAIN = {
[domains.MAINNET]: 137,
[domains.TESTNET]: 80002,
[domains.DEVNET]: 80002,
};
const chainId = CHAIN_ID_FOR_DOMAIN[domain];

console.log('Domain:', domain);
console.log('Ritual ID:', ritualId);
Expand Down

0 comments on commit cc82237

Please sign in to comment.