合約跟單交易所系統(tǒng)開(kāi)發(fā)實(shí)現(xiàn)技術(shù)詳細(xì)及案例源碼
What is Dapp?Dapp is an abbreviation for decentralized use,also known as distributed use.DAPP is a variety of distributed usage derived from underlying blockchain channels,and is a form of service provision in blockchain international.It is considered a symbol of the beginning of the blockchain 3.0 era.Knowledge:In a system with many nodes(such as blockchain),each node has a highly autonomous feature.Nodes can freely connect to each other,forming new connection units.
DApp全稱(chēng)Decentralized Application,翻譯過(guò)來(lái)就是去中心化應(yīng)用,也稱(chēng)分布式應(yīng)用。
DApp=D+App,開(kāi)發(fā)唯:MrsFu123,簡(jiǎn)單說(shuō),就和我們的手機(jī)APP一樣,兩者的原理類(lèi)似,不同的是APP是建立在IOS系統(tǒng)或者Android系統(tǒng)之上,需要中間人去運(yùn)營(yíng)管理代碼和數(shù)據(jù)。
The advantage of DApp lies in the unique data integrity,tamper proof and valuable transmission function of the blockchain,which is reflected in the trusted data sharing,secure transactions,changes in industry relations of production,and reduction of operation and maintenance costs in actual use.
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);
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;
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);
function removeLiquidityWithPermit(
address tokenA,
address tokenB,
uint liquidity,
uint amountAMin,
uint amountBMin,
address to,
uint deadline,
bool approveMax,uint8 v,bytes32 r,bytes32 s
)external returns(uint amountA,uint amountB);
function removeLiquidityETHWithPermit(
address token,
uint liquidity,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline,
bool approveMax,uint8 v,bytes32 r,bytes32 s
)external returns(uint amountToken,uint amountETH);
function swapExactTokensForTokens(
uint amountIn,
uint amountOutMin,
address[]calldata path,
address to,
uint deadline
)external returns(uint[]memory amounts);
function swapTokensForExactTokens(
uint amountOut,
uint amountInMax,
address[]calldata path,
address to,
uint deadline
)external returns(uint[]memory amounts);