1.1 Initialization
yarn install1.2 Open new terminal and run local node for local scripts to work
yarn run hardhat:node1.3 Open new terminal and run one of next commands
Compile contracts:
yarn run hardhat:compileLocal contracts deployment:
yarn run hardhat:deploy:localContracts test swaps on local deployment:
yarn run hardhat:setup:localTest swap with test contracts on local deployment:
yarn run hardhat:swap:localIf some test failing - this could be caused by wrong pool_hash constant value.
Try cleaning cache files, start local node and run command hardhat:deploy:local
Generate json files to pass contract verification (for ex. TestBNB explorer):
yarn run hardhat:verify1.4.
Generate pools in batch and mint liquidity (sepolia):
- under deployments folder copy folder localhost and rename it to sepolia
- edit files in this sepolia folder and set their real contracts address (as they deployed on real net)
- runs script
yarn run hardhat:pools:sepoliaCommand may be called with additional param - setting pools FEE (for example, 3000)
yarn run hardhat:pools:sepolia:30001.5.
Collect gas consumption for major list of operations
(change local to sepolia or other supported network to run on that network)
To test on local - local hardhat node should be running and deploy script executed
yarn run hardhat:gastest:local