Returns TEA balances for multiple account/vault pairs in a single call.
Parameter
Type
Description
owners
address[]
Array of accounts
vaultIds
uint256[]
Array of vault IDs (must match owners length)
totalSupply
Returns the total supply of TEA for a specific vault.
Parameter
Type
Description
vaultId
uint256
The vault to query
lockEnd
Returns the timestamp when a user's TEA position in a vault becomes unlocked. Returns 0 if never locked.
Parameter
Type
Description
account
address
The account to query
vaultId
uint256
The vault to query
Lock functionality is only active on MegaETH, where LPers can choose to lock TEA during minting to reduce the LP fee. On Ethereum and HyperEVM this always returns 0.
paramsById
Returns the vault parameters for a given vault ID.
Returns the total number of vaults that have been created.
uri
Returns the ERC1155 metadata URI for a vault. Returns a data: URL encoding a JSON object with name, symbol, decimals, chain ID, token addresses, leverage tier, and total supply.
Parameter
Type
Description
vaultId
uint256
The vault to query
supportsInterface
ERC165 interface detection. Returns true for ERC165, ERC1155, and ERC1155MetadataURI.
safeTransferFrom
Transfers TEA from one account to another.
Parameter
Type
Description
from
address
Sender address
to
address
Recipient address
vaultId
uint256
The vault (token ID)
amount
uint256
Amount of TEA to transfer
data
bytes
Additional data for onERC1155Received callback
On MegaETH, transfers will revert with TransferToLowerLockEnd if the sender's lock end timestamp exceeds the recipient's. This prevents circumventing lock periods by transferring to an unlocked wallet.
safeBatchTransferFrom
Batch transfers TEA across multiple vaults.
Parameter
Type
Description
from
address
Sender address
to
address
Recipient address
vaultIds
uint256[]
Array of vault IDs
amounts
uint256[]
Array of amounts (must match vaultIds length)
data
bytes
Additional data for onERC1155BatchReceived callback
setApprovalForAll
Grants or revokes operator approval for all TEA transfers.
Parameter
Type
Description
operator
address
The operator address
approved
bool
Whether to approve or revoke
isApprovedForAll
Checks if an operator is approved for all TEA transfers on behalf of an account.
APE (ERC20 Leveraged Token)
Each vault has its own APE contract deployed as a minimal clone. APE tokens represent leveraged positions and are standard ERC20 tokens with EIP-2612 permit support.
leverageTier
Returns the leverage tier for this APE token (stored as an immutable argument in the clone).
Returns:int8 โ leverage tier from -2 to +2.
DOMAIN_SEPARATOR
Returns the EIP-712 domain separator for permit signatures.
nonces
Returns the current permit nonce for an address (EIP-2612).
Standard ERC20
APE implements the full ERC20 interface plus EIP-2612 permit:
Function
Signature
name
name() returns (string)
symbol
symbol() returns (string)
decimals
decimals() returns (uint8)
totalSupply
totalSupply() returns (uint256)
balanceOf
balanceOf(address account) returns (uint256)
transfer
transfer(address to, uint256 amount) returns (bool)
transferFrom
transferFrom(address from, address to, uint256 amount) returns (bool)