WildcatMarketToken.sol

The WildcatMarketToken is the token-related logic contract containing functions for transfers and approvals.

allowance

mapping(address => mapping(address => uint256)) public allowance;

Amount of the market token that a spender may transfer on behalf of another owner.

balanceOf

function balanceOf(address account) public view virtual nonReentrantView returns (uint256);

Balance of an account based on the current market state scaled by the scale factor.

Reverts if:

  • the reentrancy lock is engaged.

totalSupply

function totalSupply() external view virtual nonReentrantView returns (uint256);

Total supply of the market token based on the current market state scaled by the scale factor.

Reverts if:

  • the reentrancy lock is engaged.

approve

function approve(address spender, uint256 amount) external virtual nonReentrant returns (bool);

Sets the allowance of the caller for the given spender to transfer on their behalf.

Reverts if:

  • the reentrancy lock is engaged.

Logs:

transfer

function transfer(address to, uint256 amount) external virtual nonReentrant returns (bool);

Transfers an amount of the market token from the caller to another account and updates the market state.

Reverts if:

  • the reentrancy lock is engaged.

  • the caller's scaled balance is less than the scaled transfer amount.

  • the caller is blacklisted.

  • the receiver is blacklisted.

Logs:

transferFrom

function transferFrom(
    address from,
    address to,
    uint256 amount
) external virtual nonReentrant returns (bool);

Transfers an amount of the market token from one account to another, decreases the allowance by the amount if applicable, and updates the market state.

Reverts if:

  • the reentrancy lock is engaged.

  • the caller's allowance for the sender is less than the amount.

  • the caller's scaled balance is less than the scaled transfer amount.

  • the caller is blacklisted.

  • the receiver is blacklisted.

Logs:

Last updated