DAO代幣合約流動性挖礦開發(fā)規(guī)則丨DAO代幣合約流動性挖礦系統(tǒng)開發(fā)(詳細邏輯及方案)
智能合約:Web3.0支持智能合約,這是一種通過編程實現(xiàn)的合約,其代碼運行在區(qū)塊鏈上,可以自動執(zhí)行合約條件。
去中心化應用程序(DApps):Web3.0使得開發(fā)者可以構(gòu)建去中心化應用程序(DApps),這些應用程序不依賴于中心化服務器,而是依賴于區(qū)塊鏈上的智能合約和去中心化存儲來提供服務
event Sync(uint112 reserve0,uint112 reserve1);
function MINIMUM_LIQUIDITY()external pure returns(uint);
function factory()external view returns(address);
function token0()external view returns(address);
function token1()external view returns(address);
function getReserves()external view returns(uint112 reserve0,uint112 reserve1,uint32 blockTimestampLast);
function price0CumulativeLast()external view returns(uint);開發(fā)詳細I35流程7O98開發(fā)O7I8
function price1CumulativeLast()external view returns(uint);
function kLast()external view returns(uint);
function mint(address to)external returns(uint liquidity);
function burn(address to)external returns(uint amount0,uint amount1);
function swap(uint amount0Out,uint amount1Out,address to,bytes calldata data)external;
function skim(address to)external;設計方案:MrsFu123
function sync()external;
function initialize(address,address)external;
}
interface IUniswapV2Router01{
function factory()external pure returns(address);
function WETH()external pure returns(address);
function addLiquidity(
address tokenA,
address tokenB,
uint amountADesired,
uint amountBDesired,
uint amountAMin,
uint amountBMin,
address to,
uint deadline
)external returns(uint amountA,uint amountB,uint liquidity);
function addLiquidityETH(
address token,
uint amountTokenDesired,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
)external payable returns(uint amountToken,uint amountETH,uint liquidity);
function removeLiquidity(
address tokenA,
address tokenB,
uint liquidity,
uint amountAMin,
uint amountBMin,
address to,
uint deadline
)external returns(uint amountA,uint amountB);
function removeLiquidityETH(
address token,
uint liquidity,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
)external returns(uint amountToken,uint amountETH);