Pot2Pump ABI

Pot2PumpFactory Module


createPair method

Creates a new trading pair in Pot2Pump.

### ABI Format
{
  "inputs": [{
    "components": [{
      "internalType": "address",
      "name": "raisedToken",
      "type": "address"
    }, {
      "internalType": "string",
      "name": "name",
      "type": "string"
    }, {
      "internalType": "string", 
      "name": "symbol",
      "type": "string"
    }, {
      "internalType": "address",
      "name": "swapHandler",
      "type": "address"
    }],
    "internalType": "struct Pot2PumpFactory.CreatePairParams",
    "name": "params",
    "type": "tuple"
  }],
  "name": "createPair",
  "outputs": [{
    "internalType": "address",
    "name": "pair",
    "type": "address"
  }, {
    "internalType": "address",
    "name": "launchedToken",
    "type": "address"
  }],
  "stateMutability": "nonpayable",
  "type": "function"
}

Structure

Field
Type
Description

params

tuple

Parameter struct required for creating the trading pair.

raisedToken

address

Address of the token being raised.

name

string

Name of the new trading pair.

symbol

string

Symbol of the new trading pair.

swapHandler

address

Address of the swap handler contract.

Returns

Name
Type
Description

pair

address

Address of the newly created trading pair.

handler

address

Address of the handler linked to the pair.


depositRaisedToken & refundRaisedToken methods

  1. depositRaisedToken

This method is used to deposit fundraising tokens.

Structure

Field
Type
Description

depositor

address

Depositor's address

amount

uint256

Deposit amount

  1. Checks that the pair status is not paused

  2. Verifies current time hasn't exceeded end time

  3. Deposits made in the first half of the launch cycle are considered early deposits

  4. Automatically executes _perform() if total deposits reach minimum cap

  1. refundRaisedToken

This method is used to refund raised tokens.

  1. Refunds are only possible when:

    • Fundraising period has ended and minimum cap wasn't reached

    • Or pair status is paused

  2. Returns user's deposited tokens

  3. Updates early deposit records


claimLP & claimableLP methods

  1. claimLP

This method is used to claim LP tokens.

Structure

Field
Type
Description

claimer

address

Claimer's address

  1. Checks pair status must be Success

  2. Transfers claimable LP tokens to specified address

  3. Includes reentrancy protection (nonReentrant)

  1. claimableLP

This method is used to query claimable LP token amount.

Structure

Field
Type
Description

claimer

address

Query address

Returns

Field
Type
Description

""

uint256

Amount of claimable LP tokens

  1. Checks pair status must be Success

  2. Calculates total LP amount for the address

  3. Returns unclaimed LP amount (total minus claimed)

Last updated