Detailed Development Steps
Last updated
Last updated
Official download:
After downloading, simply extract and install
nvm
to Install and Switch Node.jsInstall NVM
Load NVM:
Install the latest version of Node.js:
Switch to the newly installed version:
Set the new version as default:
Verify versions:
Open the project file with VS Code
Enter the following in the bottom command line for automatic installation
After configuration, enter env
to check if the configuration is successful
After obtaining the optimal 3 exchange paths, you can build transactions based on the optimal path
Users can call the swapExactInput
method of the smart contract to trigger transactions. The Smart Router will process the transaction data internally and complete the transaction.
For complete code, please refer to the request.mjs
file in the project. You can replace the function parameters at the bottom according to your needs.
GitHub address:
For more details, refer to
For more details, refer to
You can also refer to
After the transaction is successfully executed, it returns the transaction hash. You can further view the detailed information of the transaction on using the hash.