Using our ABIs to Build Your Own Telegram Bots
Welcome to the Dx.fun end-user guide on using our ABI (Application Binary Interface) to build your own Telegram bots. This guide will help you understand how to set up your own bot to monitor and notify you of important token-related events on the blockchain.
What is the Event Tracker ABI?
The Event Tracker is a set of predefined events and functions that allow you to track activities such as token creation, buying, selling, and listing on Dx.fun. By using this ABI, you can create a Telegram bot that provides real-time updates on these activities. The following is the JSON file to our Event Tracker ABI:
Event Tracker ABI
[
{
"inputs":[
{
"internalType":"address",
"name":"_funStorage",
"type":"address"
}
],
"stateMutability":"nonpayable",
"type":"constructor"
},
{
"anonymous":false,
"inputs":[
{
"indexed":true,
"internalType":"address",
"name":"previousOwner",
"type":"address"
}
],
"name":"OwnershipRenounced",
"type":"event"
},
{
"anonymous":false,
"inputs":[
{
"indexed":true,
"internalType":"address",
"name":"previousOwner",
"type":"address"
},
{
"indexed":true,
"internalType":"address",
"name":"newOwner",
"type":"address"
}
],
"name":"OwnershipTransferred",
"type":"event"
},
{
"anonymous":false,
"inputs":[
{
"indexed":true,
"internalType":"address",
"name":"buyer",
"type":"address"
},
{
"indexed":true,
"internalType":"address",
"name":"funContract",
"type":"address"
},
{
"indexed":false,
"internalType":"uint256",
"name":"buyAmount",
"type":"uint256"
},
{
"indexed":false,
"internalType":"uint256",
"name":"tokenReceived",
"type":"uint256"
},
{
"indexed":false,
"internalType":"uint256",
"name":"index",
"type":"uint256"
},
{
"indexed":false,
"internalType":"uint256",
"name":"timestamp",
"type":"uint256"
}
],
"name":"buyCall",
"type":"event"
},
{
"anonymous":false,
"inputs":[
{
"indexed":true,
"internalType":"address",
"name":"creator",
"type":"address"
},
{
"indexed":true,
"internalType":"address",
"name":"funContract",
"type":"address"
},
{
"indexed":true,
"internalType":"address",
"name":"tokenAddress",
"type":"address"
},
{
"indexed":false,
"internalType":"string",
"name":"name",
"type":"string"
},
{
"indexed":false,
"internalType":"string",
"name":"symbol",
"type":"string"
},
{
"indexed":false,
"internalType":"string",
"name":"data",
"type":"string"
},
{
"indexed":false,
"internalType":"uint256",
"name":"totalSupply",
"type":"uint256"
},
{
"indexed":false,
"internalType":"uint256",
"name":"initialReserve",
"type":"uint256"
},
{
"indexed":false,
"internalType":"uint256",
"name":"timestamp",
"type":"uint256"
}
],
"name":"funCreated",
"type":"event"
},
{
"anonymous":false,
"inputs":[
{
"indexed":true,
"internalType":"address",
"name":"user",
"type":"address"
},
{
"indexed":true,
"internalType":"address",
"name":"tokenAddress",
"type":"address"
},
{
"indexed":true,
"internalType":"address",
"name":"router",
"type":"address"
},
{
"indexed":false,
"internalType":"uint256",
"name":"liquidityAmount",
"type":"uint256"
},
{
"indexed":false,
"internalType":"uint256",
"name":"tokenAmount",
"type":"uint256"
},
{
"indexed":false,
"internalType":"uint256",
"name":"time",
"type":"uint256"
},
{
"indexed":false,
"internalType":"uint256",
"name":"totalVolume",
"type":"uint256"
}
],
"name":"listed",
"type":"event"
},
{
"anonymous":false,
"inputs":[
{
"indexed":true,
"internalType":"address",
"name":"seller",
"type":"address"
},
{
"indexed":true,
"internalType":"address",
"name":"funContract",
"type":"address"
},
{
"indexed":false,
"internalType":"uint256",
"name":"sellAmount",
"type":"uint256"
},
{
"indexed":false,
"internalType":"uint256",
"name":"nativeReceived",
"type":"uint256"
},
{
"indexed":false,
"internalType":"uint256",
"name":"index",
"type":"uint256"
},
{
"indexed":false,
"internalType":"uint256",
"name":"timestamp",
"type":"uint256"
}
],
"name":"sellCall",
"type":"event"
},
{
"anonymous":false,
"inputs":[
{
"indexed":true,
"internalType":"address",
"name":"caller",
"type":"address"
},
{
"indexed":true,
"internalType":"address",
"name":"funContract",
"type":"address"
},
{
"indexed":false,
"internalType":"uint256",
"name":"outAmount",
"type":"uint256"
},
{
"indexed":false,
"internalType":"uint256",
"name":"inAmount",
"type":"uint256"
},
{
"indexed":false,
"internalType":"uint256",
"name":"index",
"type":"uint256"
},
{
"indexed":false,
"internalType":"uint256",
"name":"timestamp",
"type":"uint256"
},
{
"indexed":false,
"internalType":"string",
"name":"tradeType",
"type":"string"
}
],
"name":"tradeCall",
"type":"event"
},
{
"inputs":[
{
"internalType":"address",
"name":"_newDeployer",
"type":"address"
}
],
"name":"addDeployer",
"outputs":[
],
"stateMutability":"nonpayable",
"type":"function"
},
{
"inputs":[
{
"internalType":"address",
"name":"_buyer",
"type":"address"
},
{
"internalType":"address",
"name":"_funContract",
"type":"address"
},
{
"internalType":"uint256",
"name":"_buyAmount",
"type":"uint256"
},
{
"internalType":"uint256",
"name":"_tokenRecieved",
"type":"uint256"
}
],
"name":"buyEvent",
"outputs":[
],
"stateMutability":"nonpayable",
"type":"function"
},
{
"inputs":[
],
"name":"buyEventCount",
"outputs":[
{
"internalType":"uint256",
"name":"",
"type":"uint256"
}
],
"stateMutability":"view",
"type":"function"
},
{
"inputs":[
{
"internalType":"address",
"name":"creator",
"type":"address"
},
{
"internalType":"address",
"name":"funContract",
"type":"address"
},
{
"internalType":"address",
"name":"tokenAddress",
"type":"address"
},
{
"internalType":"string",
"name":"name",
"type":"string"
},
{
"internalType":"string",
"name":"symbol",
"type":"string"
},
{
"internalType":"string",
"name":"data",
"type":"string"
},
{
"internalType":"uint256",
"name":"totalSupply",
"type":"uint256"
},
{
"internalType":"uint256",
"name":"initialReserve",
"type":"uint256"
},
{
"internalType":"uint256",
"name":"timestamp",
"type":"uint256"
}
],
"name":"createFunEvent",
"outputs":[
],
"stateMutability":"nonpayable",
"type":"function"
},
{
"inputs":[
{
"internalType":"address",
"name":"",
"type":"address"
}
],
"name":"funContractCreatedByDeployer",
"outputs":[
{
"internalType":"address",
"name":"",
"type":"address"
}
],
"stateMutability":"view",
"type":"function"
},
{
"inputs":[
{
"internalType":"address",
"name":"",
"type":"address"
}
],
"name":"funContractDeployer",
"outputs":[
{
"internalType":"bool",
"name":"",
"type":"bool"
}
],
"stateMutability":"view",
"type":"function"
},
{
"inputs":[
{
"internalType":"address",
"name":"",
"type":"address"
}
],
"name":"funContractIndex",
"outputs":[
{
"internalType":"uint256",
"name":"",
"type":"uint256"
}
],
"stateMutability":"view",
"type":"function"
},
{
"inputs":[
],
"name":"funRegistry",
"outputs":[
{
"internalType":"address",
"name":"",
"type":"address"
}
],
"stateMutability":"view",
"type":"function"
},
{
"inputs":[
{
"internalType":"address",
"name":"user",
"type":"address"
},
{
"internalType":"address",
"name":"tokenAddress",
"type":"address"
},
{
"internalType":"address",
"name":"router",
"type":"address"
},
{
"internalType":"uint256",
"name":"liquidityAmount",
"type":"uint256"
},
{
"internalType":"uint256",
"name":"tokenAmount",
"type":"uint256"
},
{
"internalType":"uint256",
"name":"_time",
"type":"uint256"
},
{
"internalType":"uint256",
"name":"totalVolume",
"type":"uint256"
}
],
"name":"listEvent",
"outputs":[
],
"stateMutability":"nonpayable",
"type":"function"
},
{
"inputs":[
],
"name":"owner",
"outputs":[
{
"internalType":"address",
"name":"",
"type":"address"
}
],
"stateMutability":"view",
"type":"function"
},
{
"inputs":[
{
"internalType":"address",
"name":"_deployer",
"type":"address"
}
],
"name":"removeDeployer",
"outputs":[
],
"stateMutability":"nonpayable",
"type":"function"
},
{
"inputs":[
],
"name":"renounceOwnership",
"outputs":[
],
"stateMutability":"nonpayable",
"type":"function"
},
{
"inputs":[
{
"internalType":"address",
"name":"_seller",
"type":"address"
},
{
"internalType":"address",
"name":"_funContract",
"type":"address"
},
{
"internalType":"uint256",
"name":"_sellAmount",
"type":"uint256"
},
{
"internalType":"uint256",
"name":"_nativeRecieved",
"type":"uint256"
}
],
"name":"sellEvent",
"outputs":[
],
"stateMutability":"nonpayable",
"type":"function"
},
{
"inputs":[
],
"name":"sellEventCount",
"outputs":[
{
"internalType":"uint256",
"name":"",
"type":"uint256"
}
],
"stateMutability":"view",
"type":"function"
},
{
"inputs":[
{
"internalType":"address",
"name":"_newOwner",
"type":"address"
}
],
"name":"transferOwnership",
"outputs":[
],
"stateMutability":"nonpayable",
"type":"function"
}
]What is the Fun Pool ABI?
The Fun Pool handles the creation, management, and trading of tokens. Automated Trading Bots can use buyTokens and sellTokens functions to automate trading actions based on specific conditions.
The following is the JSON file to our Fun Contract ABI:
Fun Pool ABI
[
{
"inputs":[
{
"internalType":"address",
"name":"_implementation",
"type":"address"
},
{
"internalType":"address",
"name":"_feeContract",
"type":"address"
},
{
"internalType":"address",
"name":"_lpLockDeployer",
"type":"address"
},
{
"internalType":"address",
"name":"_stableAddress",
"type":"address"
},
{
"internalType":"address",
"name":"_eventTracker",
"type":"address"
},
{
"internalType":"uint16",
"name":"_feePer",
"type":"uint16"
}
],
"stateMutability":"payable",
"type":"constructor"
},
{
"inputs":[
],
"name":"FailedDeployment",
"type":"error"
},
{
"inputs":[
{
"internalType":"uint256",
"name":"balance",
"type":"uint256"
},
{
"internalType":"uint256",
"name":"needed",
"type":"uint256"
}
],
"name":"InsufficientBalance",
"type":"error"
},
{
"inputs":[
],
"name":"ReentrancyGuardReentrantCall",
"type":"error"
},
{
"anonymous":false,
"inputs":[
{
"indexed":true,
"internalType":"address",
"name":"provider",
"type":"address"
},
{
"indexed":false,
"internalType":"uint256",
"name":"tokenAmount",
"type":"uint256"
},
{
"indexed":false,
"internalType":"uint256",
"name":"ethAmount",
"type":"uint256"
}
],
"name":"LiquidityAdded",
"type":"event"
},
{
"anonymous":false,
"inputs":[
{
"indexed":true,
"internalType":"address",
"name":"previousOwner",
"type":"address"
}
],
"name":"OwnershipRenounced",
"type":"event"
},
{
"anonymous":false,
"inputs":[
{
"indexed":true,
"internalType":"address",
"name":"previousOwner",
"type":"address"
},
{
"indexed":true,
"internalType":"address",
"name":"newOwner",
"type":"address"
}
],
"name":"OwnershipTransferred",
"type":"event"
},
{
"anonymous":false,
"inputs":[
{
"indexed":true,
"internalType":"address",
"name":"user",
"type":"address"
},
{
"indexed":false,
"internalType":"uint256",
"name":"amountIn",
"type":"uint256"
},
{
"indexed":false,
"internalType":"uint256",
"name":"amountOut",
"type":"uint256"
},
{
"indexed":false,
"internalType":"uint256",
"name":"_time",
"type":"uint256"
},
{
"indexed":false,
"internalType":"uint256",
"name":"reserveEth",
"type":"uint256"
},
{
"indexed":false,
"internalType":"uint256",
"name":"reserveTokens",
"type":"uint256"
},
{
"indexed":false,
"internalType":"uint256",
"name":"totalVolume",
"type":"uint256"
}
],
"name":"bought",
"type":"event"
},
{
"anonymous":false,
"inputs":[
{
"indexed":true,
"internalType":"address",
"name":"user",
"type":"address"
},
{
"indexed":false,
"internalType":"uint256",
"name":"amountIn",
"type":"uint256"
},
{
"indexed":false,
"internalType":"uint256",
"name":"amountOut",
"type":"uint256"
},
{
"indexed":false,
"internalType":"uint256",
"name":"_time",
"type":"uint256"
},
{
"indexed":false,
"internalType":"uint256",
"name":"reserveEth",
"type":"uint256"
},
{
"indexed":false,
"internalType":"uint256",
"name":"reserveTokens",
"type":"uint256"
},
{
"indexed":false,
"internalType":"string",
"name":"tradeType",
"type":"string"
},
{
"indexed":false,
"internalType":"uint256",
"name":"totalVolume",
"type":"uint256"
}
],
"name":"funTradeCall",
"type":"event"
},
{
"anonymous":false,
"inputs":[
{
"indexed":true,
"internalType":"address",
"name":"user",
"type":"address"
},
{
"indexed":true,
"internalType":"address",
"name":"tokenAddress",
"type":"address"
},
{
"indexed":true,
"internalType":"address",
"name":"router",
"type":"address"
},
{
"indexed":false,
"internalType":"uint256",
"name":"liquidityAmount",
"type":"uint256"
},
{
"indexed":false,
"internalType":"uint256",
"name":"tokenAmount",
"type":"uint256"
},
{
"indexed":false,
"internalType":"uint256",
"name":"_time",
"type":"uint256"
},
{
"indexed":false,
"internalType":"uint256",
"name":"totalVolume",
"type":"uint256"
}
],
"name":"listed",
"type":"event"
},
{
"anonymous":false,
"inputs":[
{
"indexed":true,
"internalType":"address",
"name":"user",
"type":"address"
},
{
"indexed":false,
"internalType":"uint256",
"name":"amountIn",
"type":"uint256"
},
{
"indexed":false,
"internalType":"uint256",
"name":"amountOut",
"type":"uint256"
},
{
"indexed":false,
"internalType":"uint256",
"name":"_time",
"type":"uint256"
},
{
"indexed":false,
"internalType":"uint256",
"name":"reserveEth",
"type":"uint256"
},
{
"indexed":false,
"internalType":"uint256",
"name":"reserveTokens",
"type":"uint256"
},
{
"indexed":false,
"internalType":"uint256",
"name":"totalVolume",
"type":"uint256"
}
],
"name":"sold",
"type":"event"
},
{
"inputs":[
],
"name":"BASIS_POINTS",
"outputs":[
{
"internalType":"uint256",
"name":"",
"type":"uint256"
}
],
"stateMutability":"view",
"type":"function"
},
{
"inputs":[
],
"name":"DEAD",
"outputs":[
{
"internalType":"address",
"name":"",
"type":"address"
}
],
"stateMutability":"view",
"type":"function"
},
{
"inputs":[
],
"name":"HUNDRED",
"outputs":[
{
"internalType":"uint256",
"name":"",
"type":"uint256"
}
],
"stateMutability":"view",
"type":"function"
},
{
"inputs":[
{
"internalType":"address",
"name":"_deployer",
"type":"address"
}
],
"name":"addDeployer",
"outputs":[
],
"stateMutability":"nonpayable",
"type":"function"
},
{
"inputs":[
{
"internalType":"address",
"name":"",
"type":"address"
}
],
"name":"allowedDeployers",
"outputs":[
{
"internalType":"bool",
"name":"",
"type":"bool"
}
],
"stateMutability":"view",
"type":"function"
},
{
"inputs":[
{
"internalType":"address",
"name":"funToken",
"type":"address"
},
{
"internalType":"uint256",
"name":"minTokens",
"type":"uint256"
},
{
"internalType":"address",
"name":"_affiliate",
"type":"address"
}
],
"name":"buyTokens",
"outputs":[
],
"stateMutability":"payable",
"type":"function"
},
{
"inputs":[
{
"internalType":"address",
"name":"funToken",
"type":"address"
},
{
"internalType":"uint8",
"name":"_newNativePer",
"type":"uint8"
}
],
"name":"changeNativePer",
"outputs":[
],
"stateMutability":"nonpayable",
"type":"function"
},
{
"inputs":[
{
"internalType":"string[2]",
"name":"_name_symbol",
"type":"string[2]"
},
{
"internalType":"uint256",
"name":"_totalSupply",
"type":"uint256"
},
{
"internalType":"address",
"name":"_creator",
"type":"address"
},
{
"internalType":"address",
"name":"_baseToken",
"type":"address"
},
{
"internalType":"address",
"name":"_router",
"type":"address"
},
{
"internalType":"uint256[2]",
"name":"listThreshold_initReserveEth",
"type":"uint256[2]"
},
{
"internalType":"bool",
"name":"lpBurn",
"type":"bool"
}
],
"name":"createFun",
"outputs":[
{
"internalType":"address",
"name":"",
"type":"address"
}
],
"stateMutability":"payable",
"type":"function"
},
{
"inputs":[
],
"name":"eventTracker",
"outputs":[
{
"internalType":"address",
"name":"",
"type":"address"
}
],
"stateMutability":"view",
"type":"function"
},
{
"inputs":[
],
"name":"feeContract",
"outputs":[
{
"internalType":"address",
"name":"",
"type":"address"
}
],
"stateMutability":"view",
"type":"function"
},
{
"inputs":[
],
"name":"feePer",
"outputs":[
{
"internalType":"uint16",
"name":"",
"type":"uint16"
}
],
"stateMutability":"view",
"type":"function"
},
{
"inputs":[
{
"internalType":"address",
"name":"funToken",
"type":"address"
},
{
"internalType":"uint256",
"name":"amountIn",
"type":"uint256"
}
],
"name":"getAmountOutETH",
"outputs":[
{
"internalType":"uint256",
"name":"amountOut",
"type":"uint256"
}
],
"stateMutability":"view",
"type":"function"
},
{
"inputs":[
{
"internalType":"address",
"name":"funToken",
"type":"address"
},
{
"internalType":"uint256",
"name":"amountIn",
"type":"uint256"
}
],
"name":"getAmountOutTokens",
"outputs":[
{
"internalType":"uint256",
"name":"amountOut",
"type":"uint256"
}
],
"stateMutability":"view",
"type":"function"
},
{
"inputs":[
{
"internalType":"address",
"name":"funToken",
"type":"address"
},
{
"internalType":"address",
"name":"_tokenAddress",
"type":"address"
},
{
"internalType":"uint256",
"name":"_ethIN",
"type":"uint256"
}
],
"name":"getAmountsMinToken",
"outputs":[
{
"internalType":"uint256",
"name":"",
"type":"uint256"
}
],
"stateMutability":"view",
"type":"function"
},
{
"inputs":[
{
"internalType":"address",
"name":"funToken",
"type":"address"
}
],
"name":"getBaseToken",
"outputs":[
{
"internalType":"address",
"name":"",
"type":"address"
}
],
"stateMutability":"view",
"type":"function"
},
{
"inputs":[
{
"internalType":"address",
"name":"funToken",
"type":"address"
}
],
"name":"getCurrentCap",
"outputs":[
{
"internalType":"uint256",
"name":"",
"type":"uint256"
}
],
"stateMutability":"view",
"type":"function"
},
{
"inputs":[
{
"internalType":"address",
"name":"funToken",
"type":"address"
}
],
"name":"getFuntokenPool",
"outputs":[
{
"components":[
{
"internalType":"address",
"name":"creator",
"type":"address"
},
{
"internalType":"address",
"name":"token",
"type":"address"
},
{
"internalType":"address",
"name":"baseToken",
"type":"address"
},
{
"internalType":"address",
"name":"router",
"type":"address"
},
{
"internalType":"address",
"name":"lockerAddress",
"type":"address"
},
{
"internalType":"address",
"name":"storedLPAddress",
"type":"address"
},
{
"internalType":"address",
"name":"deployer",
"type":"address"
},
{
"components":[
{
"internalType":"uint256",
"name":"reserveTokens",
"type":"uint256"
},
{
"internalType":"uint256",
"name":"reserveETH",
"type":"uint256"
},
{
"internalType":"uint256",
"name":"volume",
"type":"uint256"
},
{
"internalType":"uint256",
"name":"listThreshold",
"type":"uint256"
},
{
"internalType":"uint256",
"name":"initialReserveEth",
"type":"uint256"
},
{
"internalType":"uint8",
"name":"nativePer",
"type":"uint8"
},
{
"internalType":"bool",
"name":"tradeActive",
"type":"bool"
},
{
"internalType":"bool",
"name":"lpBurn",
"type":"bool"
},
{
"internalType":"bool",
"name":"royalemitted",
"type":"bool"
}
],
"internalType":"struct FunPool.FunTokenPoolData",
"name":"pool",
"type":"tuple"
}
],
"internalType":"struct FunPool.FunTokenPool",
"name":"",
"type":"tuple"
}
],
"stateMutability":"view",
"type":"function"
},
{
"inputs":[
{
"internalType":"address[]",
"name":"funTokens",
"type":"address[]"
}
],
"name":"getFuntokenPools",
"outputs":[
{
"components":[
{
"internalType":"address",
"name":"creator",
"type":"address"
},
{
"internalType":"address",
"name":"token",
"type":"address"
},
{
"internalType":"address",
"name":"baseToken",
"type":"address"
},
{
"internalType":"address",
"name":"router",
"type":"address"
},
{
"internalType":"address",
"name":"lockerAddress",
"type":"address"
},
{
"internalType":"address",
"name":"storedLPAddress",
"type":"address"
},
{
"internalType":"address",
"name":"deployer",
"type":"address"
},
{
"components":[
{
"internalType":"uint256",
"name":"reserveTokens",
"type":"uint256"
},
{
"internalType":"uint256",
"name":"reserveETH",
"type":"uint256"
},
{
"internalType":"uint256",
"name":"volume",
"type":"uint256"
},
{
"internalType":"uint256",
"name":"listThreshold",
"type":"uint256"
},
{
"internalType":"uint256",
"name":"initialReserveEth",
"type":"uint256"
},
{
"internalType":"uint8",
"name":"nativePer",
"type":"uint8"
},
{
"internalType":"bool",
"name":"tradeActive",
"type":"bool"
},
{
"internalType":"bool",
"name":"lpBurn",
"type":"bool"
},
{
"internalType":"bool",
"name":"royalemitted",
"type":"bool"
}
],
"internalType":"struct FunPool.FunTokenPoolData",
"name":"pool",
"type":"tuple"
}
],
"internalType":"struct FunPool.FunTokenPool[]",
"name":"",
"type":"tuple[]"
}
],
"stateMutability":"view",
"type":"function"
},
{
"inputs":[
{
"internalType":"address",
"name":"user",
"type":"address"
}
],
"name":"getUserFuntokens",
"outputs":[
{
"internalType":"address[]",
"name":"",
"type":"address[]"
}
],
"stateMutability":"view",
"type":"function"
},
{
"inputs":[
{
"internalType":"address",
"name":"funToken",
"type":"address"
}
],
"name":"getWrapAddr",
"outputs":[
{
"internalType":"address",
"name":"",
"type":"address"
}
],
"stateMutability":"view",
"type":"function"
},
{
"inputs":[
],
"name":"implementation",
"outputs":[
{
"internalType":"address",
"name":"",
"type":"address"
}
],
"stateMutability":"view",
"type":"function"
},
{
"inputs":[
],
"name":"lpLockDeployer",
"outputs":[
{
"internalType":"address",
"name":"",
"type":"address"
}
],
"stateMutability":"view",
"type":"function"
},
{
"inputs":[
],
"name":"owner",
"outputs":[
{
"internalType":"address",
"name":"",
"type":"address"
}
],
"stateMutability":"view",
"type":"function"
},
{
"inputs":[
{
"internalType":"address",
"name":"_deployer",
"type":"address"
}
],
"name":"removeDeployer",
"outputs":[
],
"stateMutability":"nonpayable",
"type":"function"
},
{
"inputs":[
],
"name":"renounceOwnership",
"outputs":[
],
"stateMutability":"nonpayable",
"type":"function"
},
{
"inputs":[
{
"internalType":"address",
"name":"funToken",
"type":"address"
},
{
"internalType":"uint256",
"name":"tokenAmount",
"type":"uint256"
},
{
"internalType":"uint256",
"name":"minEth",
"type":"uint256"
},
{
"internalType":"address",
"name":"_affiliate",
"type":"address"
}
],
"name":"sellTokens",
"outputs":[
{
"internalType":"bool",
"name":"",
"type":"bool"
},
{
"internalType":"bool",
"name":"",
"type":"bool"
}
],
"stateMutability":"nonpayable",
"type":"function"
},
{
"inputs":[
],
"name":"stableAddress",
"outputs":[
{
"internalType":"address",
"name":"",
"type":"address"
}
],
"stateMutability":"view",
"type":"function"
},
{
"inputs":[
{
"internalType":"address",
"name":"",
"type":"address"
}
],
"name":"tokenPools",
"outputs":[
{
"internalType":"address",
"name":"creator",
"type":"address"
},
{
"internalType":"address",
"name":"token",
"type":"address"
},
{
"internalType":"address",
"name":"baseToken",
"type":"address"
},
{
"internalType":"address",
"name":"router",
"type":"address"
},
{
"internalType":"address",
"name":"lockerAddress",
"type":"address"
},
{
"internalType":"address",
"name":"storedLPAddress",
"type":"address"
},
{
"internalType":"address",
"name":"deployer",
"type":"address"
},
{
"components":[
{
"internalType":"uint256",
"name":"reserveTokens",
"type":"uint256"
},
{
"internalType":"uint256",
"name":"reserveETH",
"type":"uint256"
},
{
"internalType":"uint256",
"name":"volume",
"type":"uint256"
},
{
"internalType":"uint256",
"name":"listThreshold",
"type":"uint256"
},
{
"internalType":"uint256",
"name":"initialReserveEth",
"type":"uint256"
},
{
"internalType":"uint8",
"name":"nativePer",
"type":"uint8"
},
{
"internalType":"bool",
"name":"tradeActive",
"type":"bool"
},
{
"internalType":"bool",
"name":"lpBurn",
"type":"bool"
},
{
"internalType":"bool",
"name":"royalemitted",
"type":"bool"
}
],
"internalType":"struct FunPool.FunTokenPoolData",
"name":"pool",
"type":"tuple"
}
],
"stateMutability":"view",
"type":"function"
},
{
"inputs":[
{
"internalType":"address",
"name":"_newOwner",
"type":"address"
}
],
"name":"transferOwnership",
"outputs":[
],
"stateMutability":"nonpayable",
"type":"function"
},
{
"inputs":[
{
"internalType":"address",
"name":"_newEventTracker",
"type":"address"
}
],
"name":"updateEventTracker",
"outputs":[
],
"stateMutability":"nonpayable",
"type":"function"
},
{
"inputs":[
{
"internalType":"address",
"name":"_newFeeContract",
"type":"address"
}
],
"name":"updateFeeContract",
"outputs":[
],
"stateMutability":"nonpayable",
"type":"function"
},
{
"inputs":[
{
"internalType":"address",
"name":"_implementation",
"type":"address"
}
],
"name":"updateImplementation",
"outputs":[
],
"stateMutability":"nonpayable",
"type":"function"
},
{
"inputs":[
{
"internalType":"address",
"name":"_newLpLockDeployer",
"type":"address"
}
],
"name":"updateLpLockDeployer",
"outputs":[
],
"stateMutability":"nonpayable",
"type":"function"
},
{
"inputs":[
{
"internalType":"address",
"name":"_newStableAddress",
"type":"address"
}
],
"name":"updateStableAddress",
"outputs":[
],
"stateMutability":"nonpayable",
"type":"function"
},
{
"inputs":[
{
"internalType":"uint16",
"name":"_newFeePer",
"type":"uint16"
}
],
"name":"updateteamFeeper",
"outputs":[
],
"stateMutability":"nonpayable",
"type":"function"
},
{
"inputs":[
{
"internalType":"address",
"name":"",
"type":"address"
},
{
"internalType":"uint256",
"name":"",
"type":"uint256"
}
],
"name":"userFunTokens",
"outputs":[
{
"internalType":"address",
"name":"",
"type":"address"
}
],
"stateMutability":"view",
"type":"function"
},
{
"inputs":[
],
"name":"voter",
"outputs":[
{
"internalType":"address",
"name":"",
"type":"address"
}
],
"stateMutability":"view",
"type":"function"
}
]What is the Fun Storage ABI?
The Fun Storage contract acts as a registry and storage system for all Fun Contracts deployed. By using this ABI, bots can access the registry to get information about all deployed Fun Contracts that includes up-to-date information on total supply, initial liquidity, owner details, etc. The following is the JSON file Fun Storage ABI:
Fun Storage ABI
[
{
"anonymous":false,
"inputs":[
{
"indexed":true,
"internalType":"address",
"name":"previousOwner",
"type":"address"
}
],
"name":"OwnershipRenounced",
"type":"event"
},
{
"anonymous":false,
"inputs":[
{
"indexed":true,
"internalType":"address",
"name":"previousOwner",
"type":"address"
},
{
"indexed":true,
"internalType":"address",
"name":"newOwner",
"type":"address"
}
],
"name":"OwnershipTransferred",
"type":"event"
},
{
"inputs":[
{
"internalType":"address",
"name":"_deployer",
"type":"address"
}
],
"name":"addDeployer",
"outputs":[
],
"stateMutability":"nonpayable",
"type":"function"
},
{
"inputs":[
{
"internalType":"address",
"name":"_funOwner",
"type":"address"
},
{
"internalType":"address",
"name":"_funAddress",
"type":"address"
},
{
"internalType":"address",
"name":"_tokenAddress",
"type":"address"
},
{
"internalType":"address",
"name":"_routerAddress",
"type":"address"
},
{
"internalType":"string",
"name":"_name",
"type":"string"
},
{
"internalType":"string",
"name":"_symbol",
"type":"string"
},
{
"internalType":"string",
"name":"_data",
"type":"string"
},
{
"internalType":"uint256",
"name":"_totalSupply",
"type":"uint256"
},
{
"internalType":"uint256",
"name":"_initialLiquidity",
"type":"uint256"
}
],
"name":"addFunContract",
"outputs":[
],
"stateMutability":"nonpayable",
"type":"function"
},
{
"inputs":[
{
"internalType":"address",
"name":"",
"type":"address"
}
],
"name":"deployer",
"outputs":[
{
"internalType":"bool",
"name":"",
"type":"bool"
}
],
"stateMutability":"view",
"type":"function"
},
{
"inputs":[
],
"name":"emergencyWithdraw",
"outputs":[
],
"stateMutability":"nonpayable",
"type":"function"
},
{
"inputs":[
{
"internalType":"address",
"name":"",
"type":"address"
}
],
"name":"funContractToIndex",
"outputs":[
{
"internalType":"uint256",
"name":"",
"type":"uint256"
}
],
"stateMutability":"view",
"type":"function"
},
{
"inputs":[
{
"internalType":"address",
"name":"",
"type":"address"
}
],
"name":"funContractToOwner",
"outputs":[
{
"internalType":"address",
"name":"",
"type":"address"
}
],
"stateMutability":"view",
"type":"function"
},
{
"inputs":[
{
"internalType":"address",
"name":"",
"type":"address"
}
],
"name":"funContractToOwnerCount",
"outputs":[
{
"internalType":"uint256",
"name":"",
"type":"uint256"
}
],
"stateMutability":"view",
"type":"function"
},
{
"inputs":[
{
"internalType":"uint256",
"name":"",
"type":"uint256"
}
],
"name":"funContracts",
"outputs":[
{
"internalType":"address",
"name":"funAddress",
"type":"address"
},
{
"internalType":"address",
"name":"tokenAddress",
"type":"address"
},
{
"internalType":"address",
"name":"funOwner",
"type":"address"
},
{
"internalType":"address",
"name":"router",
"type":"address"
},
{
"internalType":"string",
"name":"name",
"type":"string"
},
{
"internalType":"string",
"name":"symbol",
"type":"string"
},
{
"internalType":"string",
"name":"data",
"type":"string"
},
{
"internalType":"uint256",
"name":"totalSupply",
"type":"uint256"
},
{
"internalType":"uint256",
"name":"initialLiquidity",
"type":"uint256"
},
{
"internalType":"uint256",
"name":"createdOn",
"type":"uint256"
}
],
"stateMutability":"view",
"type":"function"
},
{
"inputs":[
],
"name":"funCount",
"outputs":[
{
"internalType":"uint256",
"name":"",
"type":"uint256"
}
],
"stateMutability":"view",
"type":"function"
},
{
"inputs":[
{
"internalType":"uint256",
"name":"index",
"type":"uint256"
}
],
"name":"getFunContract",
"outputs":[
{
"components":[
{
"internalType":"address",
"name":"funAddress",
"type":"address"
},
{
"internalType":"address",
"name":"tokenAddress",
"type":"address"
},
{
"internalType":"address",
"name":"funOwner",
"type":"address"
},
{
"internalType":"address",
"name":"router",
"type":"address"
},
{
"internalType":"string",
"name":"name",
"type":"string"
},
{
"internalType":"string",
"name":"symbol",
"type":"string"
},
{
"internalType":"string",
"name":"data",
"type":"string"
},
{
"internalType":"uint256",
"name":"totalSupply",
"type":"uint256"
},
{
"internalType":"uint256",
"name":"initialLiquidity",
"type":"uint256"
},
{
"internalType":"uint256",
"name":"createdOn",
"type":"uint256"
}
],
"internalType":"struct FunStorage.FunDetails",
"name":"",
"type":"tuple"
}
],
"stateMutability":"view",
"type":"function"
},
{
"inputs":[
{
"internalType":"address",
"name":"_funContract",
"type":"address"
}
],
"name":"getFunContractIndex",
"outputs":[
{
"internalType":"uint256",
"name":"",
"type":"uint256"
}
],
"stateMutability":"view",
"type":"function"
},
{
"inputs":[
{
"internalType":"address",
"name":"_funContract",
"type":"address"
}
],
"name":"getFunContractOwner",
"outputs":[
{
"internalType":"address",
"name":"",
"type":"address"
}
],
"stateMutability":"view",
"type":"function"
},
{
"inputs":[
],
"name":"getTotalContracts",
"outputs":[
{
"internalType":"uint256",
"name":"",
"type":"uint256"
}
],
"stateMutability":"view",
"type":"function"
},
{
"inputs":[
],
"name":"owner",
"outputs":[
{
"internalType":"address",
"name":"",
"type":"address"
}
],
"stateMutability":"view",
"type":"function"
},
{
"inputs":[
{
"internalType":"address",
"name":"",
"type":"address"
},
{
"internalType":"uint256",
"name":"",
"type":"uint256"
}
],
"name":"ownerIndexToStorageIndex",
"outputs":[
{
"internalType":"uint256",
"name":"",
"type":"uint256"
}
],
"stateMutability":"view",
"type":"function"
},
{
"inputs":[
{
"internalType":"address",
"name":"",
"type":"address"
}
],
"name":"ownerToFunCount",
"outputs":[
{
"internalType":"uint256",
"name":"",
"type":"uint256"
}
],
"stateMutability":"view",
"type":"function"
},
{
"inputs":[
{
"internalType":"address",
"name":"_deployer",
"type":"address"
}
],
"name":"removeDeployer",
"outputs":[
],
"stateMutability":"nonpayable",
"type":"function"
},
{
"inputs":[
],
"name":"renounceOwnership",
"outputs":[
],
"stateMutability":"nonpayable",
"type":"function"
},
{
"inputs":[
{
"internalType":"address",
"name":"",
"type":"address"
}
],
"name":"tokenContractToIndex",
"outputs":[
{
"internalType":"uint256",
"name":"",
"type":"uint256"
}
],
"stateMutability":"view",
"type":"function"
},
{
"inputs":[
{
"internalType":"address",
"name":"_newOwner",
"type":"address"
}
],
"name":"transferOwnership",
"outputs":[
],
"stateMutability":"nonpayable",
"type":"function"
},
{
"inputs":[
{
"internalType":"address",
"name":"_funOwner",
"type":"address"
},
{
"internalType":"uint256",
"name":"_ownerFunIndex",
"type":"uint256"
},
{
"internalType":"string",
"name":"_data",
"type":"string"
}
],
"name":"updateData",
"outputs":[
],
"stateMutability":"nonpayable",
"type":"function"
},
{
"inputs":[
],
"name":"voter",
"outputs":[
{
"internalType":"address",
"name":"",
"type":"address"
}
],
"stateMutability":"view",
"type":"function"
}
]What is the Fun Deployer ABI?
The Fun Deployer contract is used for Fun Contracts to be deployed. The following is the JSON file Fun Deployer ABI:
Contract Addresses
Base
0xCDF72821AF1e78Af720E506744195B622ffbeb89
0xFaE1701bC57FC694F836F0704642E15E43C88d3A
0x41d9138FEace47B22Afce190Fd118b0f5eeEA62d
0x4bEb2Fd73a0eDd5D911965d057276a757E1be9F1
BSC
0xCDF72821AF1e78Af720E506744195B622ffbeb89
0xFaE1701bC57FC694F836F0704642E15E43C88d3A
0x41d9138FEace47B22Afce190Fd118b0f5eeEA62d
0x4bEb2Fd73a0eDd5D911965d057276a757E1be9F1
Ethereum
0xCDF72821AF1e78Af720E506744195B622ffbeb89
0xFaE1701bC57FC694F836F0704642E15E43C88d3A
0x41d9138FEace47B22Afce190Fd118b0f5eeEA62d
0x4bEb2Fd73a0eDd5D911965d057276a757E1be9F1
Arbitrum
0xCDF72821AF1e78Af720E506744195B622ffbeb89
0xFaE1701bC57FC694F836F0704642E15E43C88d3A
0x41d9138FEace47B22Afce190Fd118b0f5eeEA62d
0x4bEb2Fd73a0eDd5D911965d057276a757E1be9F1
Step-by-Step Guide
Step 1: Set Up Your Environment
Before you start, make sure you have the necessary tools installed on your computer:
Node.js
Web3.js
Telegram Bot API library
You can install these tools by running the following commands in your terminal:
Step 2: Create a Telegram Bot
Create a bot on Telegram using the BotFather and obtain your bot token. Follow this guide if you need help.
Set up your bot to start listening for events.
Step 3: Initialize Your Project
Create a new JavaScript file, e.g., bot.js, and initialize your project with the following code:
Replace YOUR_INFURA_PROJECT_ID, YOUR_TELEGRAM_BOT_TOKEN, and YOUR_CONTRACT_ADDRESS with your actual Infura project ID, Telegram bot token, and contract address.
Step 4: Listen for Events
Now, let's set up the bot to listen for specific events and send notifications to your Telegram chat.
Listening for Buy Events
Listening for Sell Events
Replace YOUR_TELEGRAM_CHAT_ID with your actual Telegram chat ID.
Step 5: Deploy Your Bot
Once your bot is set up and configured to listen for events, you can deploy it to a server to keep it running continuously. This ensures you receive real-time notifications about token activities.
Benefits of Using Dx.fun’s ABIs
Real-Time Notifications: Receive instant notifications about important events such as token buys, sells, creation, and listings.
Transparency: All events are tracked on the blockchain, ensuring accuracy and trust.
Automation: Automatically receive notifications without manual monitoring.
Enhanced Trading Capabilities: Create automated trading bots that execute trades based on predefined conditions and access comprehensive details about each trade enabling better analysis and decision-making.
Centralized Registry and Information Access: Maintain a centralized registry of all Fun Contracts, making it easy to manage and access information about all deployed contracts.
Customization: Build a bot that suits your specific needs, whether for personal use or to engage a community.
By following this guide, you can create powerful and engaging Telegram bots that provide valuable real-time information about your tokens. Whether you’re a developer or a token enthusiast, using the Dx.fun Event Track ABI enables you to stay updated and connected to your blockchain activities.
Last updated