Request form
Cookbook may introduce a token in the future. Share and contribute to be eligible for future airdrops.
close icon
relevant tag icon
PancakeFactory
copy icon
PancakeSwap
• version 1.0.0
ERC20
BEP20
DEX
Token
Audited

PancakeFactory

Audited

PancakeFactory is used to create and manage "PancakePair" smart contracts. These PancakePair contracts are used to trade two different ERC-20 tokens together as a pair. The contract has several functions, including creating a new PancakePair contract for a given pair of ERC-20 tokens, keeping track of all the created pairs, and allowing for the setting of a fee recipient and the address that can set the fee recipient. Additionally, it implements an interface IPancakeFactory.

*Visit desktop site to download or deploy

Version

1.0.0

Recent Use

🍞 0x6860 downloaded

Last Publish

1/15/2023
Any contract you deploy is yours.
Fully owned and controlled by your wallet.
Documentation
Source Code
allPairsLength() :
This function returns the length of the allPairs array. It does this by accessing the length property of the allPairs array and returning it as a uint. (autogenerated documentation)
createPair(address,address) :
This function creates a new pair of tokens. It takes two addresses as parameters, tokenA and tokenB, and returns the address of the newly created pair. It first checks that the two addresses are not the same, and then it sorts them so that tokenA is always the smaller address. It then checks that neither address is the address of a zero account. It then checks that a pair with these two tokens does not already exist. It then creates a new pair using the create2 function, passing in the bytecode of the PancakePair contract, a salt, and the two token addresses. Finally, it stores the address of the new pair in the getPair mapping, adds it to the allPairs array, (autogenerated documentation)
setFeeTo(address) :
This function allows the feeToSetter address to set the feeTo address. This is done by requiring that the msg.sender is equal to the feeToSetter address, and if it is, then the feeTo address is set to the address passed in as an argument. (autogenerated documentation)
setFeeToSetter(address) :
This function allows the feeToSetter address to set the feeToSetter address. It works by requiring that the msg.sender is equal to the feeToSetter address, and if it is, then the feeToSetter address is set to the address passed in as an argument. (autogenerated documentation)

Get Cookin'
share iconShare

copy iconDownload Source
copy iconnpx cookbookdev i PancakeFactory
copy icon

Recent Use

🍞 0x6860 downloaded

Last Publish

1/15/2023

Version

1.0.0

Cookbook is free.
Any contract you deploy is yours.
Your contract is owned and controlled by you.