Deployment scripts based on UniswapV2 to the OneLedger network
yarn
pip3 install -r requirements.txt
npm run compile
cp example.env .env
- set
DEPLOYER_PK
to execute the transaction on the protocol (ed25519 key) - set
FEE_ADDRESS
for OneSwap contract - set
NODE_URL
for communicating with protocol
The several steps will be executed in order to deploy the OneSwap (base on Uniswap) contracts:
- Deployment UniswapV2Factory;
- Deployment WOLT token (WETH9 based);
- Deployment UniswapV2Router;
In order to have an initial liquidity, the next steps performed:
- Deployment of ERC20 base token;
- Adding liquidity with WOLT + ERC20 tokens to create UniswapV2Pair;
npm run test_deploy
Available commands to work with a pool colud be found via
python3 oneswap.py --help
Methods:
test_deploy
- initial test deployment to start worklp_info
- liquidity pool infoadd_liquidity
- adding the liquidity to poolremove_liquidity
- removing the liquidity from poolswap
- performs swap between tokensbalance
- balance of an address for the tokens