DPPFactory

Mantle

0x46af6b152f2cb02a3cfcc74014c2617bc4f6cd5c

Solidity v0.6.9+commit.3e3065ac

🤖
通过你的 AI 查询此合约
引用: 0x46af6b152f2cb02a3cfcc74014c2617bc4f6cd5c
示例提示词: "Tell me the current state of mantle/0x46af6b152f2cb02a3cfcc74014c2617bc4f6cd5c"
还没有接入 AI?→ mcp.smarts.md
Mantle 在 Smarts 上是仅文档链:源代码和 ABI 已索引,但当前不提供实时链上数据(状态、最新事件、管理员画像)。AI 代理仍可通过 MCP 调用 get_contract_info 和 get_contract_source。

概览

读取函数
14
写入函数
13
事件
6

读取函数

_CLONE_FACTORY_() view

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

返回值

名称 类型 描述
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

返回值

名称 类型 描述
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

返回值

名称 类型 描述
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

返回值

名称 类型 描述
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

返回值

名称 类型 描述
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

返回值

名称 类型 描述
address The address of the DPP template contract.✨ AI
_NEW_OWNER_() view

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

返回值

名称 类型 描述
address The address designated as the new owner (pending ownership transfer).✨ AI
_OWNER_() view

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

返回值

名称 类型 描述
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

参数

名称 类型 描述
address
address
uint256

返回值

名称 类型 描述
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

参数

名称 类型 描述
address
uint256

返回值

名称 类型 描述
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

参数

名称 类型 描述
baseToken address Address of the base token in the pair.✨ AI
quoteToken address Address of the quote token in the pair.✨ AI

返回值

名称 类型 描述
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

参数

名称 类型 描述
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

返回值

名称 类型 描述
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

参数

名称 类型 描述
user address Address to query for DODO pools associated with that user.✨ AI

返回值

名称 类型 描述
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

参数

名称 类型 描述
address

返回值

名称 类型 描述
bool True if the address is listed as an admin, otherwise false.✨ AI

写入函数

addAdminList(contractAddr: address) nonpayable

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

参数

名称 类型 描述
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

参数

名称 类型 描述
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

参数

名称 类型 描述
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

返回值

名称 类型 描述
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

参数

名称 类型 描述
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

参数

名称 类型 描述
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

参数

名称 类型 描述
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

参数

名称 类型 描述
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

参数

名称 类型 描述
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

参数

名称 类型 描述
_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

参数

名称 类型 描述
_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

参数

名称 类型 描述
_newDPPTemplate address New DPP template contract address to use for future deployments.✨ AI

事件

NewDPP(baseToken: address, quoteToken: address, creator: address, dpp: address)
名称 类型 已索引 描述
baseToken address
quoteToken address
creator address
dpp address
OwnershipTransferPrepared(previousOwner: address, newOwner: address)
名称 类型 已索引 描述
previousOwner address
newOwner address
OwnershipTransferred(previousOwner: address, newOwner: address)
名称 类型 已索引 描述
previousOwner address
newOwner address
RemoveDPP(dpp: address)
名称 类型 已索引 描述
dpp address
addAdmin(admin: address)
名称 类型 已索引 描述
admin address
removeAdmin(admin: address)
名称 类型 已索引 描述
admin address