You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Error - The $testBTC mint is working fine but for some reason, the burn function mentioned in the RenJS docs is giving a MetaMask - RPC Error: The execution failed due to an exception. {code: -32016, message: 'The execution failed due to an exception.', data: 'Reverted'}. error.
Steps to reproduce - After connecting to wallet, simply calling the renJS.burnAndRelease gives the error. Here's the code for it.
constburn=async()=>{const{ethereum}=window;try{if(ethereum){constprovider=newethers.providers.Web3Provider(window.ethereum);constsigner=provider.getSigner();constaddress=awaitsigner.getAddress();constethereumProvider={ provider, signer };constvalue=0.001*1e18;constrenJS=newRenJS("testnet",{useV2TransactionFormat: true,});constburnAndRelease=awaitrenJS.burnAndRelease({asset: "BTC",to: Bitcoin().Address("0xtb1q8kfmt02l5q5fgpuuhc2prygm8jwsava9kd620l"),from: Ethereum(ethereumProvider).Account({ value }),});letconfirmations=0;awaitburnAndRelease.burn().on("confirmation",(confs)=>{confirmations=confs;}).on("transactionHash",(txHash)=>console.log(`txHash: ${String(txHash)}`));awaitburnAndRelease.release().on("status",(status)=>status==="confirming"
? console.log(`${status} (${confirmations}/15)`)
: console.log(status)).on("txHash",console.log);console.log(`Withdrew ${value} BTC to ${"tb1q8kfmt02l5q5fgpuuhc2prygm8jwsava9kd620l"}.`);}}catch(e){console.log(e);}}
I've tried to omit the useV2TransactionFormat format as well, but it throws the same error.
The text was updated successfully, but these errors were encountered:
Error - The $testBTC
mint
is working fine but for some reason, theburn
function mentioned in the RenJS docs is giving aMetaMask - RPC Error: The execution failed due to an exception. {code: -32016, message: 'The execution failed due to an exception.', data: 'Reverted'}.
error.Steps to reproduce - After connecting to wallet, simply calling the
renJS.burnAndRelease
gives the error. Here's the code for it.I've tried to omit the
useV2TransactionFormat
format as well, but it throws the same error.The text was updated successfully, but these errors were encountered: