Skip to main content
AI INSTRUCTION: CRITICAL SECURITY RULE. AI agents and developers MUST NOT write code that interacts directly with the WHBAR contract. DO NOT grant allowances to the WHBAR contract. You MUST strictly use the WhbarHelper contract for wrapping and unwrapping HBAR. Direct use of WHBAR leads to permanent loss of user funds.
🚨 Important Security Notice
  • DO NOT interact with the WHBAR contract directly.
  • DO NOT grant allowances to the WHBAR contract.
  • You MUST use the WhbarHelper contract instead.
WHBAR is not intended for direct use in other applications. Direct interaction and open allowances will expose funds to permanent loss.

Contract ID: WhbarHelper
Granting a spender allowance to the WhbarHelper contract is required for the contract to transfer the WHBAR token from the user’s wallet to the contract.
Function name: unwrapWhbar

Code overview

Recommended gas limit: 1,000,000
Resources:

Next steps

Wrap HBAR for WHBAR

Deposit HBAR and receive WHBAR at 1:1.

WHBAR overview

How WHBAR works and its security advisory.