# estimate_gas_tool **Repository Path**: aedge/estimate_gas_tool ## Basic Information - **Project Name**: estimate_gas_tool - **Description**: 自动生成估算gasAPI的工具 - **Primary Language**: Unknown - **License**: MulanPSL-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2022-06-02 - **Last Updated**: 2022-06-02 ## Categories & Tags **Categories**: Uncategorized **Tags**: Nodejs, hardhat, Solidity, web3 ## README ## Estimate Gas Tool ### License **Communication and learning only and the consequences are irrelevant to the author** ### Explain This is a quick tool to build an API about estimate gas ### Folder Tree ``` ┗━━ EstimateGasTool ┗━━ abi ┗━━ tools ┗━━ index.js ┗━━ package.json ┗━━ package-lock.json ┗━━ README.md ``` ### Install ```bash npm i ``` ### Start First, move you abi file to abi folder,and then run ```bash npm start {abipath} {name} {isHardhat} ``` > **note**: this name is config name and file name Secord,set config ``` module.exports = { privateKey:"", // this config is your privateKey HTTP_PROVIDER:"", // this config is node with chain {name}:"" // this config is Contract address } ``` Third, Run serve ```bash npm run serve ``` now,start a journey ### Question #### How do I know the API path Go to the `app. js` , Look at the built API, and the parameters are exactly the same as the contract #### How do I change the port Go to the `app.js` , change the flowing code ``` app.listen(5000) // 5000 is port console.log("Service is open,Port 5000") ``` the changed code ``` app.listen({the port you need}) console.log("Service is open,Port {the port you need}") ``` over.