Skip to content

No value found for txidVersion=null and chain=0:11155111 #78

Description

@kamalbuilds

gasEstimateforshield is failing without proper clues why ? @zy0n @staltz

image

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>>>")

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions