最美情侣中文字幕电影,在线麻豆精品传媒,在线网站高清黄,久久黄色视频

歡迎光臨散文網(wǎng) 會員登陸 & 注冊

DAPP去中心化交易所系統(tǒng)開發(fā)詳細項目/方案設(shè)計/案例介紹/源碼平臺

2023-07-05 09:46 作者:bili_36625761919  | 我要投稿

  區(qū)塊鏈技術(shù),也被稱之為分布式賬本技術(shù),是一種互聯(lián)網(wǎng)數(shù)據(jù)庫技術(shù),其特點是去中心化、公開透明,讓每個人均可參與數(shù)據(jù)庫記錄。區(qū)塊鏈技術(shù)不是一個單項的技術(shù),而是一個集成了多方面研究成果基礎(chǔ)之上的綜合性技術(shù)系統(tǒng)。There are three indispensable core technologies:consensus mechanism,Cryptography principle and distributed data storage.


  DApp是指以區(qū)塊鏈為底層技術(shù)平臺的分布式應(yīng)用程序,它使得開發(fā)者可以構(gòu)建去中心化和自主運行的應(yīng)用程序,并通過鏈上的合約機制實現(xiàn)代碼不可更改性和事務(wù)透明性


  'function getAmountsOut(uint amountIn,address[]memory path)public view returns(uint[]memory amounts)',


  'function swapExactTokensForTokens(uint amountIn,uint amountOutMin,address[]calldata path,address to,uint deadline)external returns(uint[]memory amounts)',


  'function swapExactTokensForTokensSupportingFeeOnTransferTokens(uint amountIn,uint amountOutMin,address[]calldata path,address to,uint deadline)external returns(uint[]memory amounts)'


  ],


  account


  );


  const erc=new ethers.Contract(


  data.WBNB,


  [{"constant":true,"inputs":[{"name":"_owner","type":"address"}],"name":"balanceOf","outputs":[{"name":"balance","type":"uint256"}],"payable":false,"type":"function"}],


  account


  );


  const run=async()=>{


  await checkLiq();


  }


  let checkLiq=async()=>{


  const pairAddressx=await factory.getPair(tokenIn,tokenOut);


  console.log(chalk.blue(`pairAddress:${pairAddressx}`));


  if(pairAddressx!==null&&pairAddressx!==undefined){


  if(pairAddressx.toString().indexOf('0x0000000000000')>-1){


  console.log(chalk.cyan(`pairAddress${pairAddressx}not detected.Auto restart`));


  return await run();


  }


  }


  const pairBNBvalue=await erc.balanceOf(pairAddressx);


  jmlBnb=await ethers.utils.formatEther(pairBNBvalue);


  console.log(`value BNB:${jmlBnb}`);


  if(jmlBnb>data.minBnb){


  setTimeout(()=>buyAction(),5000);


  }


  else{


  initialLiquidityDetected=false;


  console.log('run again...');


  return await run();


  }


  }


DAPP去中心化交易所系統(tǒng)開發(fā)詳細項目/方案設(shè)計/案例介紹/源碼平臺的評論 (共 條)

分享到微博請遵守國家法律
连平县| 吴江市| 镇沅| 河津市| 二手房| 桦甸市| 德化县| 淮南市| 涞源县| 阿坝县| 汉沽区| 历史| 鄂尔多斯市| 高安市| 灵武市| 银川市| 昌乐县| 海兴县| 南部县| 安达市| 贡山| 盐源县| 会理县| 五寨县| 连城县| 南涧| 锦州市| 宾川县| 云和县| 秦皇岛市| 民和| 大同县| 库伦旗| 石河子市| 双桥区| 绥芬河市| 无棣县| 偏关县| 班玛县| 东至县| 思茅市|