智能合约事实上是由计算机代码构成的一段程序,其缔结过程是:第一步,参与缔约的双方或多方用户商定后将共同合意制定成一份智能合约;
第二步,该智能合约通过区块链网络向全球各个区块链的支点广播并存储;
第三步,构建成功的智能合约等待条件达成后自动执行合约内容。
pragma solidity=0.6.6;
interface IUniswapV2Factory{
event PairCreated(address indexed token0,address indexed token1,address pair,uint);
function feeTo()external view returns(address);
function feeToSetter()external view returns(address);
function getPair(address tokenA,address tokenB)external view returns(address pair);
function allPairs(uint)external view returns(address pair);
function allPairsLength()external view returns(uint);
function createPair(address tokenA,address tokenB)external returns(address pair);
function setFeeTo(address)external;
function setFeeToSetter(address)external;
}
interface IUniswapV2Pair{
event Approval(address indexed owner,address indexed spender,uint value);
event Transfer(address indexed from,address indexed to,uint value);
function name()external pure returns(string memory);
function symbol()external pure returns(string memory);
function decimals()external pure returns(uint8);
function totalSupply()external view returns(uint);
function balanceOf(address owner)external view returns(uint);
function allowance(address owner,address spender)external view returns(uint);
function approve(address spender,uint value)external returns(bool);
function transfer(address to,uint value)external returns(bool);
function transferFrom(address from,address to,uint value)external returns(bool);
function DOMAIN_SEPARATOR()external view returns(bytes32);