Pair (ERC 20)

This documentation covers ERC-20 functionality for denominating pool tokens. For JediSwap-specific functionality, see Pair.

Code

Pair.cairo

Events

Approval​

@event
func Approval(owner: felt, spender: felt, amount: Uint256):
end

Emitted each time allowances is updated in approve, increaseAllowance, decreaseAllowance or transferFrom

Transfer​

@event
func Transfer(from_address: felt, to_address: felt, amount: Uint256):
end

Emitted each time a transfer occurs via transfer, transferFrom, mint, or burn.

View Functions

name​

Returns JediSwap Pair for all pairs.

symbol​

Returns JEDIP for all pairs.

decimals​

Returns 18 for all pairs.

totalSupply​

Returns the total amount of pool tokens for a pair.

balanceOf​

Returns the amount of pool tokens owned by an address.

allowance​

Returns the amount of liquidity tokens owned by an address that a spender is allowed to transfer via transferFrom.

State-Changing Functions

approve​

Lets caller set their allowance for a spender.

increaseAllowance​

Lets caller increase their allowance for a spender by added_value.

decreaseAllowance​

Lets caller decrease their allowance for a spender by subtracted_value.

transfer​

Lets caller send pool tokens to an address.

transferFrom​

Sends pool tokens from one address to another.

Interface

ABI

See Pair ABI

Last updated