Overview

The WERC20 extension is the dynamic token-pair surface for wrapped native assets. It is enabled by the ERC20 keeper for registered token-pair addresses rather than by a single fixed precompile address. Address: Dynamic token-pair address

Methods

Standard ERC-20 methods plus:
MethodDescription
deposit()Wrap native CTM into WERC20 (payable)
withdraw(uint256)Unwrap WERC20 back to native CTM
Plus all standard ERC-20 methods: balanceOf, transfer, approve, transferFrom, allowance.

Usage

IWERC20 constant wctm = IWERC20(REGISTERED_TOKEN_PAIR_ADDRESS);

// Wrap native tokens
wctm.deposit{value: 1 ether}();

// Unwrap back to native
wctm.withdraw(1 ether);
For most wrapped-CTM application flows, use the pre-deployed WETH9 contract at 0xc8Fb80fCc03f699C70ff0CC08C09106288888888. WETH9 is a fixed genesis contract; WERC20 addresses are dynamic token-pair surfaces.
For exact signatures, events, and dynamic token-pair address behavior, see Precompile ABI Reference.