UniswapV2Factory
Unichain0x1f98400000000000000000000000000000000002
Solidity v0.5.16+commit.9c3226ce
🤖
通过你的 AI 查询此合约
引用:
0x1f98400000000000000000000000000000000002
示例提示词:
"Tell me the current state of unichain/0x1f98400000000000000000000000000000000002"
还没有接入 AI?→
mcp.smarts.md
Unichain 在 Smarts 上是仅文档链:源代码和 ABI 已索引,但当前不提供实时链上数据(状态、最新事件、管理员画像)。AI 代理仍可通过 MCP 调用 get_contract_info 和 get_contract_source。
概览
读取函数
5
写入函数
3
事件
1
读取函数
allPairs(uint256)
view
Returns the pair contract address at the specified index in the factory's list.✨ AI
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| — | uint256 |
返回值
| 名称 | 类型 | 描述 |
|---|---|---|
| — | address | Pair contract address located at the provided index.✨ AI |
allPairsLength()
view
Return the total number of pair contracts created by this factory.✨ AI
返回值
| 名称 | 类型 | 描述 |
|---|---|---|
| — | uint256 | Total count of pair contracts (the length of the allPairs array).✨ AI |
feeTo()
view
Returns the address that currently receives protocol fees.✨ AI
返回值
| 名称 | 类型 | 描述 |
|---|---|---|
| — | address | The address designated to receive protocol fees (feeTo).✨ AI |
feeToSetter()
view
Returns the address that can change the protocol fee recipient.✨ AI
返回值
| 名称 | 类型 | 描述 |
|---|---|---|
| — | address | The address authorized to set the fee recipient (feeTo).✨ AI |
getPair(address, address)
view
Returns the pair contract address for the two token addresses, if it exists.✨ AI
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| — | address | |
| — | address |
返回值
| 名称 | 类型 | 描述 |
|---|---|---|
| — | address | Address of the pair contract for the token pair, or the zero address if no pair exists.✨ AI |
写入函数
createPair(tokenA: address, tokenB: address)
nonpayable
Create a new pair contract for tokenA and tokenB and return its address.✨ AI
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| tokenA | address | Address of the first ERC-20 token.✨ AI |
| tokenB | address | Address of the second ERC-20 token.✨ AI |
返回值
| 名称 | 类型 | 描述 |
|---|---|---|
| pair | address | Address of the newly created pair contract.✨ AI |
setFeeTo(_feeTo: address)
nonpayable
Sets the address that receives protocol fees.✨ AI
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| _feeTo | address | Address that will receive protocol fees.✨ AI |
setFeeToSetter(_feeToSetter: address)
nonpayable
Set the address authorized to change the fee recipient.✨ AI
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| _feeToSetter | address | New address that can update the fee recipient (permissioned setter).✨ AI |
事件
PairCreated(token0: address, token1: address, pair: address, uint256)
| 名称 | 类型 | 已索引 | 描述 |
|---|---|---|---|
| token0 | address | ✓ | |
| token1 | address | ✓ | |
| pair | address | ||
| uint256 |