For the complete documentation index, see llms.txt. This page is also available as Markdown.

Pair(ERC-20)

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

Code

DragonswapERC20.sol

Events

Approval

event Approval(address indexed owner, address indexed spender, uint value);

Emitted each time an approval occurs via approve or permit.

Transfer

event Transfer(address indexed from, address indexed to, uint value);

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

Read-Only Functions

name

function name() external pure returns (string memory);

Returns Dragonswap for all pairs.

symbol

Returns DS 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.

DOMAIN_SEPARATOR

Returns a domain separator for use in permit.

PERMIT_TYPEHASH

Returns a typehash for use in permit.

nonces

Returns the current nonce for an address for use in permit.

State-Changing Functions

approve

Lets msg.sender set their allowance for a spender.

transfer

Lets msg.sender send pool tokens to an address.

transferFrom

Sends pool tokens from one address to another.

permit

Sets the allowance for a spender where approval is granted via a signature.

Interface

ABI

https://unpkg.com/@uniswap/v2-core@1.0.0/build/IUniswapV2ERC20.json

Last updated