DPPFactory
Mantle0x46af6b152f2cb02a3cfcc74014c2617bc4f6cd5c
Solidity v0.6.9+commit.3e3065ac
概覽
讀取函式
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 |
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 |
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 |
Gets the address used as the DODO approve proxy.✨ AI
回傳值
| 名稱 | 類型 | 描述 |
|---|---|---|
| — | address | The address currently set as the DODO approve proxy for token approvals.✨ AI |
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 |
Returns the DPP template contract address used to deploy new DPP instances.✨ AI
回傳值
| 名稱 | 類型 | 描述 |
|---|---|---|
| — | address | The address of the DPP template contract.✨ AI |
Return the address designated to become the factory's new owner.✨ AI
回傳值
| 名稱 | 類型 | 描述 |
|---|---|---|
| — | address | The address designated as the new owner (pending ownership transfer).✨ AI |
Returns the current owner address of the DPPFactory contract.✨ AI
回傳值
| 名稱 | 類型 | 描述 |
|---|---|---|
| — | address | The owner address controlling privileged operations on the contract.✨ AI |
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 |
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 |
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 |
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 |
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 |
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 |
寫入函式
Adds an address to the factory's admin list.✨ AI
參數
| 名稱 | 類型 | 描述 |
|---|---|---|
| contractAddr | address | Address to add to the admin list.✨ AI |
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 |
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 |
Finalize ownership transfer by assigning ownership to the pending owner.✨ AI
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 |
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 |
Sets the initial owner of the contract to the specified address.✨ AI
參數
| 名稱 | 類型 | 描述 |
|---|---|---|
| newOwner | address | Address to receive initial ownership and administrative permissions.✨ AI |
Remove a given address from the factory's admin list.✨ AI
參數
| 名稱 | 類型 | 描述 |
|---|---|---|
| contractAddr | address | Address to remove from the factory admin list.✨ AI |
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 |
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 |
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 |
Set the default maintainer address used for newly created DPP contracts.✨ AI
參數
| 名稱 | 類型 | 描述 |
|---|---|---|
| _newMaintainer | address | Address to assign as the new default maintainer.✨ AI |
Update the DPP template address used by the factory.✨ AI
參數
| 名稱 | 類型 | 描述 |
|---|---|---|
| _newDPPTemplate | address | New DPP template contract address to use for future deployments.✨ AI |
事件
| 名稱 | 類型 | 已索引 | 描述 |
|---|---|---|---|
| baseToken | address | ||
| quoteToken | address | ||
| creator | address | ||
| dpp | address |
| 名稱 | 類型 | 已索引 | 描述 |
|---|---|---|---|
| previousOwner | address | ✓ | |
| newOwner | address | ✓ |
| 名稱 | 類型 | 已索引 | 描述 |
|---|---|---|---|
| previousOwner | address | ✓ | |
| newOwner | address | ✓ |
| 名稱 | 類型 | 已索引 | 描述 |
|---|---|---|---|
| dpp | address |
| 名稱 | 類型 | 已索引 | 描述 |
|---|---|---|---|
| admin | address |
| 名稱 | 類型 | 已索引 | 描述 |
|---|---|---|---|
| admin | address |