DPPFactory

Mantle Browse chains

0x46af6b152f2cb02a3cfcc74014c2617bc4f6cd5c

Solidity v0.6.9+commit.3e3065ac

🤖
Query this contract from your AI
Reference: 0x46af6b152f2cb02a3cfcc74014c2617bc4f6cd5c
Sample prompt: "Tell me the current state of mantle/0x46af6b152f2cb02a3cfcc74014c2617bc4f6cd5c"
No AI wired up yet? → mcp.smarts.md · Browse chains
Mantle is a docs-only chain on Smarts: source code and ABI are indexed, but live on-chain data (state, recent events, admin profile) is not currently available. AI agents can still query get_contract_info and get_contract_source via MCP.

Overview

Read Functions
14
Write Functions
13
Events
6

Read Functions

_CLONE_FACTORY_() view

Returns the address of the clone factory used to deploy DPP clones.✨ AI

Returns

Name Type Description
address Address of the clone factory contract used for creating DPP clone instances.✨ AI
_DEFAULT_MAINTAINER_() view

Returns the factory's default maintainer address.✨ AI

Returns

Name Type Description
address The default maintainer address used by the factory when a specific maintainer is not configured.✨ AI
_DEFAULT_MT_FEE_RATE_MODEL_() view

Returns the address of the default multi-token fee rate model.✨ AI

Returns

Name Type Description
address Address of the default fee rate model used when creating DPP instances.✨ AI
_DODO_APPROVE_PROXY_() view

Gets the address used as the DODO approve proxy.✨ AI

Returns

Name Type Description
address The address currently set as the DODO approve proxy for token approvals.✨ AI
_DPP_ADMIN_TEMPLATE_() view

Returns the address of the DPP admin template used by the factory.✨ AI

Returns

Name Type Description
address The address of the admin template contract used when deploying or configuring DPP instances.✨ AI
_DPP_TEMPLATE_() view

Returns the DPP template contract address used to deploy new DPP instances.✨ AI

Returns

Name Type Description
address The address of the DPP template contract.✨ AI
_NEW_OWNER_() view

Return the address designated to become the factory's new owner.✨ AI

Returns

Name Type Description
address The address designated as the new owner (pending ownership transfer).✨ AI
_OWNER_() view

Returns the current owner address of the DPPFactory contract.✨ AI

Returns

Name Type Description
address The owner address controlling privileged operations on the contract.✨ AI
_REGISTRY_(address, address, uint256) view

Return the registry entry address for the given address keys and index.✨ AI

Parameters

Name Type Description
address
address
uint256

Returns

Name Type Description
address The address stored in the registry for the provided keys and index.✨ AI
_USER_REGISTRY_(address, uint256) view

Return the user registry contract address for the given user and index.✨ AI

Parameters

Name Type Description
address
uint256

Returns

Name Type Description
address The address of the user registry contract for the specified user and index.✨ AI
getDODOPool(baseToken: address, quoteToken: address) view

Return the list of DODO pool addresses for the given base and quote token pair.✨ AI

Parameters

Name Type Description
baseToken address Address of the base token in the pair.✨ AI
quoteToken address Address of the quote token in the pair.✨ AI

Returns

Name Type Description
pools address[] pools: Array of pool addresses that match the specified token pair, possibly containing multiple pools.✨ AI
getDODOPoolBidirection(token0: address, token1: address) view

Returns arrays of DPP pool addresses for a token pair: pools with token0 as base and pools with token1 as base.✨ AI

Parameters

Name Type Description
token0 address First token address; used as the base token for the first returned array.✨ AI
token1 address Second token address; used as the base token for the second returned array.✨ AI

Returns

Name Type Description
baseToken0Pool address[] baseToken0Pool: addresses of DPP pools where token0 is the base token paired with token1.✨ AI
baseToken1Pool address[] baseToken1Pool: addresses of DPP pools where token1 is the base token paired with token0.✨ AI
getDODOPoolByUser(user: address) view

Return the list of DODO pool addresses associated with the specified user.✨ AI

Parameters

Name Type Description
user address Address to query for DODO pools associated with that user.✨ AI

Returns

Name Type Description
pools address[] An array of pool addresses (address[]) that are associated with the given user; may be empty.✨ AI
isAdminListed(address) view

Check whether a given address is listed as an admin of the factory.✨ AI

Parameters

Name Type Description
address

Returns

Name Type Description
bool True if the address is listed as an admin, otherwise false.✨ AI

Write Functions

addAdminList(contractAddr: address) nonpayable

Adds an address to the factory's admin list.✨ AI

Parameters

Name Type Description
contractAddr address Address to add to the admin list.✨ AI
addPoolByAdmin(creator: address, baseToken: address, quoteToken: address, pool: address) nonpayable

Admin adds an existing pool to the factory registry for the specified creator and token pair.✨ AI

Parameters

Name Type Description
creator address Address of the pool creator or owner to associate with this pool.✨ AI
baseToken address Address of the base ERC20 token in the pool pair.✨ AI
quoteToken address Address of the quote ERC20 token in the pool pair.✨ AI
pool address Address of the pool contract being added to the factory registry.✨ AI
batchAddPoolByAdmin(creators: address[], baseTokens: address[], quoteTokens: address[], pools: address[]) nonpayable

Adds multiple pools to the factory in a single transaction as an admin.✨ AI

Parameters

Name Type Description
creators address[] Array of pool creator addresses corresponding to each pool.✨ AI
baseTokens address[] Array of base token addresses for each pool.✨ AI
quoteTokens address[] Array of quote token addresses for each pool.✨ AI
pools address[] Array of pool contract addresses to register in the factory.✨ AI
claimOwnership() nonpayable

Finalize ownership transfer by assigning ownership to the pending owner.✨ AI

createDODOPrivatePool() nonpayable

Creates a new DODO private pool and returns the address of the deployed pool contract.✨ AI

Returns

Name Type Description
newPrivatePool address newPrivatePool: address of the newly deployed private pool contract✨ AI
initDODOPrivatePool(dppAddress: address, creator: address, baseToken: address, quoteToken: address, lpFeeRate: uint256, k: uint256, i: uint256, isOpenTwap: bool) nonpayable

Initializes a DODO private pool contract with the provided configuration parameters.✨ AI

Parameters

Name Type Description
dppAddress address Address of the DODO private pool contract to initialize.✨ AI
creator address Address to be recorded as the pool creator and owner-level actor.✨ AI
baseToken address Address of the base asset token used by the pool.✨ AI
quoteToken address Address of the quote asset token used by the pool.✨ AI
lpFeeRate uint256 Liquidity provider fee rate applied to trades, expressed in contract units.✨ AI
k uint256 Pool parameter k that controls pricing curvature or sensitivity.✨ AI
i uint256 Pool parameter i that represents a protocol-specific pricing/invariant setting.✨ AI
isOpenTwap bool Boolean flag to enable or disable TWAP-based price updates for the pool.✨ AI
initOwner(newOwner: address) nonpayable

Sets the initial owner of the contract to the specified address.✨ AI

Parameters

Name Type Description
newOwner address Address to receive initial ownership and administrative permissions.✨ AI
removeAdminList(contractAddr: address) nonpayable

Remove a given address from the factory's admin list.✨ AI

Parameters

Name Type Description
contractAddr address Address to remove from the factory admin list.✨ AI
removePoolByAdmin(creator: address, baseToken: address, quoteToken: address, pool: address) nonpayable

Admin removes a pool record that matches the given creator, baseToken, quoteToken, and pool addresses.✨ AI

Parameters

Name Type Description
creator address Address that originally created the pool.✨ AI
baseToken address Base token contract address for the pool.✨ AI
quoteToken address Quote token contract address for the pool.✨ AI
pool address Pool contract address to remove.✨ AI
transferOwnership(newOwner: address) nonpayable

Transfers ownership of the DPPFactory contract to the specified new owner.✨ AI

Parameters

Name Type Description
newOwner address Address that will become the new owner of the contract.✨ AI
updateAdminTemplate(_newDPPAdminTemplate: address) nonpayable

Set the admin template address used for newly created DPP instances.✨ AI

Parameters

Name Type Description
_newDPPAdminTemplate address Address of the new DPP admin template to use for future deployments.✨ AI
updateDefaultMaintainer(_newMaintainer: address) nonpayable

Set the default maintainer address used for newly created DPP contracts.✨ AI

Parameters

Name Type Description
_newMaintainer address Address to assign as the new default maintainer.✨ AI
updateDppTemplate(_newDPPTemplate: address) nonpayable

Update the DPP template address used by the factory.✨ AI

Parameters

Name Type Description
_newDPPTemplate address New DPP template contract address to use for future deployments.✨ AI

Events

NewDPP(baseToken: address, quoteToken: address, creator: address, dpp: address)
Name Type Indexed Description
baseToken address
quoteToken address
creator address
dpp address
OwnershipTransferPrepared(previousOwner: address, newOwner: address)
Name Type Indexed Description
previousOwner address
newOwner address
OwnershipTransferred(previousOwner: address, newOwner: address)
Name Type Indexed Description
previousOwner address
newOwner address
RemoveDPP(dpp: address)
Name Type Indexed Description
dpp address
addAdmin(admin: address)
Name Type Indexed Description
admin address
removeAdmin(admin: address)
Name Type Indexed Description
admin address