Files
uniswap-v2/contracts/interfaces/IUniswapV2Factory.sol
NoBey 3586e648b2
Some checks failed
CI / test (10.x, ubuntu-latest) (push) Has been cancelled
CI / test (12.x, ubuntu-latest) (push) Has been cancelled
init
2025-07-08 01:27:47 +08:00

35 lines
1.2 KiB
Solidity

pragma solidity >=0.5.0;
/**
* @title IUniswapV2Factory 工厂合约接口
* @notice 定义Uniswap V2工厂合约的标准接口
*/
interface IUniswapV2Factory {
/// @notice 创建新交易对时触发的事件
event PairCreated(address indexed token0, address indexed token1, address pair, uint);
/// @notice 协议手续费接收地址
function feeTo() external view returns (address);
/// @notice 有权设置feeTo的地址
function feeToSetter() external view returns (address);
/// @notice 获取指定代币对的交易对地址
function getPair(address tokenA, address tokenB) external view returns (address pair);
/// @notice 按索引获取交易对地址
function allPairs(uint) external view returns (address pair);
/// @notice 获取交易对总数
function allPairsLength() external view returns (uint);
/// @notice 创建新的交易对
function createPair(address tokenA, address tokenB) external returns (address pair);
/// @notice 设置协议手续费接收地址
function setFeeTo(address) external;
/// @notice 设置手续费设置者地址
function setFeeToSetter(address) external;
}