@oikos/swap v0.7.7
Uniswap contracts for the Tron blockchain
Install dependencies:
npm installPrivate key to use for deployment:
export TRON_NETWORK=shasta
# export DEPLOY_PRIVATE_KEY_MAINNET=privatekey_for_mainnet
export PRIVATE_KEY=yourprivatekeyCompile contracts:
npm run compileDeploy:
npm run deploy:mainnet
npm run deploy:shastaDeploying Exchange through Tronscan
Go to https://tronscan.org/#/contracts/contract-compiler and drag & drop files from
./tronscan-contractsdirectory.Click compile
- Solidity version: 0.5.8_Odyssey_v3.6.0
- Optimization: enabled
- Runs: 200
- Set
Contact NametoUniswapExchange.soland click deploy (keep other parameters to their default values). - Note contract address (e.g.
TSpoeVoxnZHdnLopfMd5YPJyFEE2zPjb8v) Add entry to
./src/other-tokens.jswith token information (token address, code and decimals). For example:{ "address": "TNo59Khpq46FGf4sD7XSWYFNfYfbc8CqNK", "code": "BNKR", "decimals": 6 }Add entry to
./addresses.jsonwith token information (addresses in tron hex format).addressis the address of the exchange previously created at step 4 andtokenAddressis the token address in tron hex format. You can usetronWeb.address.toHex('...')in browser console to convert from Tron address format to tron hex address format. Thesetupfield should be false (meaning the exchange is not setup yet).For example:
"BNKR": { "address": "41b8e350b56e26fdc2a8cbc0700657b88587043609", "tokenAddress": "418caeea9c7ebb8840ee4b49d10542b99cec6ffbc6", "decimals": 6, "setup": false }Run
npm run deploy:mainnetto setup the exchange.
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago