-
Notifications
You must be signed in to change notification settings - Fork 28
Open
Description
gasEstimateforshield is failing without proper clues why ? @zy0n @staltz
const pKey = process.env.REACT_APP_PRIVATE_KEY; // Private key of public wallet we are shielding from
const provider = new ethers.JsonRpcProvider('https://eth-sepolia.public.blastapi.io');
const wallet = new Wallet(pKey, provider);
console.log(wallet,"wallet here>>>")
const shieldSignatureMessage = getShieldPrivateKeySignatureMessage();
console.log(shieldSignatureMessage,"shieldSignatureMessage here>>>")
const shieldPrivateKey = keccak256(
await wallet.signMessage(shieldSignatureMessage),
);
console.log(shieldPrivateKey,"pvt key ")
// Address of public wallet we are shielding from
const fromWalletAddress = '0xCDBd94650047Ca3C8956e1B2dc668596EB87e64f';
const a = await gasEstimateForShield(
TXIDVersion.V2_PoseidonMerkle,
NetworkName.EthereumSepolia as any,
shieldPrivateKey,
erc20AmountRecipients,
[], // nftAmountRecipients
fromWalletAddress,
);
console.log(a,"a here>>>")
const gasEstimate = a.gasEstimate;
console.log(gasEstimate,"gasEstimate here>>>")
Metadata
Metadata
Assignees
Labels
No labels
