DragonSwap
  • Getting Started
    • 👋Welcome to DragonSwap
    • 💰How to Create & Connect a Wallet
    • 🪙Approving Tokens
    • 🔴Sei V2 EVM
  • Guides
    • Trading
      • 💱How to Swap
      • 🎁How to Wrap SEI
      • 🎀How to Unwrap SEI
    • Liqudity Providers
      • 🌊How to Add Liquidity
      • ☔How to Remove Liquidity
      • 🏊How to Deploy New Pools
      • 📉Understanding Impermanent Loss
      • 🫗V2: Concentrated Liquidity Pools
      • 🤖Automated Liquidity Managers (ALM)
    • Farms
      • 🥕Depositing to Farm
      • 🧑‍🌾Withdrawing from Farm
      • 🪙Claiming Rewards
      • 🚀Boosted Farms
    • Predictions
      • 🔮How to use Predictions
      • 🧞How Predictions work?
      • ❓Predictions FAQ
    • Analytics
      • 🏊Pools
      • 🥕Farms
      • 🪙Tokens
  • DragonSwap Token
    • Token & Tokenomics
    • How to Stake
    • DragonSwap Points
    • Protocol Rewards
  • Resources
    • 💻Developer Resources
      • 📄Smart Contracts
        • DragonswapV1
          • Factory
          • Pair
          • Pair(ERC-20)
          • Library
          • Router
          • Audit
        • DragonswapV2
          • Core
            • DragonswapV2Factory
            • DragonswapV2Pool
            • DragonswapV2PoolDeployer
            • Interfaces
              • IERC20Minimal
              • IDragonswapV2Factory
              • IDragonswapV2Pool
              • IDragonswapV2PoolDeployer
              • Callbacks
                • IDragonswapV2FlashCallback
                • IDragonswapV2MintCallback
                • IDragonswapV2SwapCallback
              • Pool
                • IDragonswapV2PoolActions
                • IDragonswapV2PoolDerivedState
                • IDragonswapV2PoolEvents
                • IDragonswapV2PoolImmutables
                • IDragonswapV2PoolOwnerActions
                • IDragonswapV2PoolState
            • Libraries
              • BitMath
              • FixedPoint128
              • FixedPoint96
              • FullMath
              • LiquidityMath
              • LowGasSafeMath
              • Oracle
              • Position
              • SafeCast
              • SecondsOutside
              • SqrtPriceMath
              • SwapMath
              • Tick
              • TickBitmap
              • TickMath
              • TransferHelper
              • UnsafeMath
          • Periphery
            • Base
              • BlockTimestamp
              • ERC721Permit
              • LiquidityManagement
              • Multicall
              • PeripheryImmutableState
              • PeripheryPayments
              • PeripheryPaymentsWithFee
              • PoolInitializer
              • SelfPermit
            • Interfaces
              • IERC20Metadata
              • IERC721Permit
              • IMulticall
              • INonfungiblePositionManager
              • INonfungibleTokenPositionDescriptor
              • IPeripheryImmutableState
              • IPeripheryPayments
              • IPeripheryPaymentsWithFee
              • IPoolInitializer
              • IQuoter
              • IQuoterV2
              • ISelfPermit
              • ISwapRouter
              • ITickLens
              • IV2Migrator
              • External
                • IERC1271
                • IERC20PermitAllowed
                • IWSEI
            • Lens
              • Quoter
              • QuoterV2
              • TickLens
            • Libraries
              • Base64
              • BytesLib
              • CallbackValidation
              • ChainId
              • HexStrings
              • LiquidityAmounts
              • NFTDescriptor
              • NFTSVG
              • OracleLibrary
              • Path
              • PoolAddress
              • PoolTicksCounter
              • PositionKey
              • TransferHelper
            • NonfungiblePositionManager
            • NonfungibleTokenPositionDescriptor
            • SwapRouter
            • V2Migrator
            • Error Codes
          • Staker
            • Overview
            • DragonswapV2Staker
            • Interfaces
              • IDragonswapV2Staker
            • Libraries
              • IncentiveId
              • NFTPositionInfo
              • RewardMath
          • Smart Router
            • Base
              • ApproveAndCall
              • ImmutableState
              • MulticallExtended
              • OracleSlippage
              • PeripheryPaymentsExtended
              • PeripheryPaymentsWithFeeExtended
              • PeripheryValidationExtended
            • Interfaces
              • IApproveAndCall
              • IImmutableState
              • IMixedRouteQuoterV1
              • IMulticallExtended
              • IOracleSlippage
              • IPeripheryPaymentsExtended
              • IPeripheryPaymentsWithFeeExtended
              • IQuoter
              • IQuoterV2
              • ISwapRouter02
              • ITokenValidator
              • IV1SwapRouter
              • IV2SwapRouter
            • Lens
              • MixedRouteQuoterV1
              • Quoter
              • QuoterV2
              • TokenValidator
            • Libraries
              • Constants
              • DragonswapLibrary
              • PoolTicksCounter
            • V1SwapRouter
            • V2SwapRouter
            • SwapRouter02
          • Audit
    • ❣️Marketing Resources
      • 🚩Brand Guidelines
      • 😂Meme Library
      • 🤗DragonSwap Ambassador Program
  • FAQ
    • 📲Official Links
    • 📄Contract Addresses
      • DragonswapV1
      • DragonswapV2
      • Predictions
    • ✨Roadmap
    • 📄 Token Listing Policy
    • 🏛️ToS
Powered by GitBook
On this page
  • IERC20Minimal
  • Functions​
  • Events​
  1. Resources
  2. Developer Resources
  3. Smart Contracts
  4. DragonswapV2
  5. Core
  6. Interfaces

IERC20Minimal

PreviousInterfacesNextIDragonswapV2Factory

Last updated 9 months ago

IERC20Minimal

Contains a subset of the full ERC20 interface that is used in DragonswapV2

Functions

balanceOf

  function balanceOf(
    address account
  ) external view returns (uint256)

Returns the balance of a token

Parameters:

Name
Type
Description

account

address

The account for which to look up the number of tokens it has, i.e. its balance

Return Values:

Type
Description

uint256

number of tokens held by the account

transfer

  function transfer(
    address recipient,
    uint256 amount
  ) external returns (bool)

Transfers the amount of token from the msg.sender to the recipient

Name
Type
Description

recipient

address

The account that will receive the amount transferred

amount

uint256

The number of tokens to send from the sender to the recipient

Type
Description

bool

true for a successful transfer, false for an unsuccessful transfer

  function allowance(
    address owner,
    address spender
  ) external view returns (uint256)

Returns the current allowance given to a spender by an owner

Name
Type
Description

owner

address

The account of the token owner

spender

address

The account of the token spender

Type
Description

uint256

current allowance granted by owner to spender

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

Sets the allowance of a spender from the msg.sender to the value amount

Name
Type
Description

spender

address

The account which will be allowed to spend a given amount of the owners tokens

amount

uint256

The amount of tokens allowed to be used by spender

Type
Description

bool

true for a successful approval, false for unsuccessful

  function transferFrom(
    address sender,
    address recipient,
    uint256 amount
  ) external returns (bool)

Transfers amount tokens from sender to recipient up to the allowance given to the msg.sender

Name
Type
Description

sender

address

The account from which the transfer will be initiated

recipient

address

The recipient of the transfer

amount

uint256

The amount of the transfer

Type
Description

bool

true for a successful transfer, false for unsuccessful

  event Transfer(
    address from,
    address to,
    uint256 value
  )

Event emitted when tokens are transferred from one address to another, either via #transfer or #transferFrom.

Name
Type
Description

from

address

The account from which the tokens were sent, i.e. the balance decreased

to

address

The account to which the tokens were sent, i.e. the balance increased

value

uint256

The amount of tokens that were transferred

  event Approval(
    address owner,
    address spender,
    uint256 value
  )

Event emitted when the approval amount for the spender of a given owner's tokens changes.

Name
Type
Description

owner

address

The account that approved spending of its tokens

spender

address

The account for which the spending allowance was modified

value

uint256

The new allowance from the owner to the spender

Parameters:

Return Values:

allowance

Parameters:

Return Values:

approve

Parameters:

Return Values:

transferFrom

Parameters:

Return Values:

Events

Transfer

Parameters:

Approval

Parameters:

💻
📄
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​