πŸ•ŠοΈ
DoveSwap
  • πŸ‘‹Welcome to DoveSwap
  • πŸ•ŠοΈOverview
  • Concepts
    • πŸ’‘Ecosystem Participants
    • ✨Glossary
    • 🧠Core Concepts
      • Swaps
      • Pools
      • Flash Swaps
      • Oracles
    • πŸ”¬Advanced Concepts
      • Fees
      • Pricing
      • Understanding Returns
  • πŸ“–Guides
    • πŸ“ˆSwapping tokens
    • πŸ’°Adding Liquidity
  • πŸ› οΈTechnical Reference
    • Smart Contracts
      • Factory
      • Pair
      • Pair (ERC-20)
      • Library
      • Router
    • Governance
Powered by GitBook
On this page
  • Events
  • Approval​
  • Transfer​
  • Read-Only Functions
  • name​
  • symbol​
  • decimals​
  • totalSupply​
  • balanceOf​
  • allowance​
  • DOMAIN_SEPARATOR​
  • PERMIT_TYPEHASH​
  • nonces​
  • State-Changing Functions
  • approve​
  • transfer​
  • transferFrom​
  • permit​
  1. Technical Reference
  2. Smart Contracts

Pair (ERC-20)

PreviousPairNextLibrary

Last updated 2 years ago

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

Events

Approval

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

Emitted each time an approval occurs via or .

Transfer

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

Emitted each time a transfer occurs via , , , or .

Read-Only Functions

name

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

Returns DoveSwap LP for all pairs.

symbol

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

Returns DOV-LP for all pairs.

function decimals() external pure returns (uint8);sol

Returns 18 for all pairs.

function totalSupply() external view returns (uint);

Returns the total amount of pool tokens for a pair.

function balanceOf(address owner) external view returns (uint);

Returns the amount of pool tokens owned by an address.

function allowance(address owner, address spender) external view returns (uint);
function DOMAIN_SEPARATOR() external view returns (bytes32);
function PERMIT_TYPEHASH() external view returns (bytes32);
function nonces(address owner) external view returns (uint);

State-Changing Functions

function approve(address spender, uint value) external returns (bool);

Lets msg.sender set their allowance for a spender.

function transfer(address to, uint value) external returns (bool);

Lets msg.sender send pool tokens to an address.

function transferFrom(address from, address to, uint value) external returns (bool);

Sends pool tokens from one address to another.

  • Requires approval.

function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external;

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

decimals

totalSupply

balanceOf

allowance

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

DOMAIN_SEPARATOR

Returns a domain separator for use in .

PERMIT_TYPEHASH

Returns a typehash for use in .

nonces

Returns the current nonce for an address for use in .

approve

Emits .

transfer

Emits .

transferFrom

Emits .

permit

Emits .

πŸ› οΈ
​
​
​
​
​
​
​
​
​
​
​
transferFrom
permit
permit
permit
Approval
Transfer
Transfer
Approval
Pair
​
​
​
​
approve
permit
transfer
transferFrom
mint
burn