6. Burning osETH
Overview
Determining Maximum Burnable osETH
const staker = new EthereumStaker({ network: 'hoodi' })
await staker.init()
const { balance: mintAmount } = await staker.getMaxMintForVault({
delegatorAddress: userAddress,
validatorAddress
})
console.log(mintAmount) // '1' - 1 ETH
if (amountToBurn > mintAmount) {
// The user is trying to burn more than they can
throw new Error('Burning amount exceeds the limit')
}Executing the Burning Transaction
Next Steps
Last updated
Was this helpful?