Build with wnAPE
For Developers Who Want to Get Their Hands Dirty
The Basic Interface
// Everything you need to know about our contract
interface IWnAPE {
function wrap(uint256 apeCoinAmount) external payable returns (uint256);
function unwrap(uint256 wnApeCoinAmount) external returns (uint256);
function getWnApeCoinByApeCoin(uint256 apeCoinAmount) external view returns (uint256);
function getApeCoinByWnApeCoin(uint256 wnApeCoinAmount) external view returns (uint256);
}
Wrapping APE Like a Boss
// Wrap native APE programmatically
function wrapMyAPE(uint256 amount) external payable {
require(msg.value == amount, "Don't try to cheat us");
uint256 wnApeReceived = IWnAPE(wnApeContract).wrap{value: amount}(amount);
// Now you have wnAPE tokens, go wild!
}
Unwrapping When You Need That Native APE
// Get your APE back when you need it
function unwrapMyWnAPE(uint256 wnApeAmount) external {
// Approve the contract first (boring but necessary)
IERC20(wnApeContract).approve(wnApeContract, wnApeAmount);
uint256 apeReceived = IWnAPE(wnApeContract).unwrap(wnApeAmount);
// Boom, you got your APE back (plus yield)
}
For DeFi Protocols (Let's Build the Future)
wnAPE is perfect for:
DEX Integrations: Create juicy APE/wnAPE or wnAPE/USDC pairs
Lending Protocols: Use wnAPE as collateral (it's solid)
Yield Farming: Set up wnAPE staking pools
Cross-Chain Protocols: Leverage our OFT superpowers
Hot Take: If you're building on ApeChain and not integrating wnAPE, you're probably doing it wrong.
Last updated