Technical Reference

Core Functions (The Important Stuff)

wrap(uint256 apeCoinAmount)

Wraps your native APE into shiny wnAPE tokens.

What you send:

  • apeCoinAmount: How much APE you want to wrap (must match msg.value or we'll revert)

What you get:

  • wnApeCoinAmount: Fresh wnAPE tokens minted just for you

Events fired:

  • Transfer(address(0), msg.sender, wnApeCoinAmount) (because transparency)

unwrap(uint256 wnApeCoinAmount)

Unwraps your wnAPE back to native APE (with yield bonus).

What you send:

  • wnApeCoinAmount: How much wnAPE you want to unwrap

What you get:

  • apeCoinAmount: Native APE sent to your wallet

Events fired:

  • Transfer(msg.sender, address(0), wnApeCoinAmount) (bye bye wnAPE)

View Functions (For the Curious)

getWnApeCoinByApeCoin(uint256 apeCoinAmount)

Preview how much wnAPE you'd get for a given APE amount.

getApeCoinByWnApeCoin(uint256 wnApeCoinAmount)

Preview how much APE you'd get for unwrapping wnAPE.

apeCoinPerToken()

Shows how much APE one wnAPE token is worth.

tokensPerApeCoin()

Shows how many wnAPE tokens you get per APE.

Standard ERC-20 Stuff

We implement all the boring but necessary ERC-20 functions:

  • balanceOf(), transfer(), approve(), transferFrom()

  • totalSupply(), allowance()

You know the drill.

Last updated