| 123456789101112131415 |
- import {web3} from "hardhat";
- import fee from "../config/fee";
- import contracts from "../config/contracts";
- describe('Calc test', () => {
- it('Univ3 calc test', async () => {
- const CALC_ABI = require('../artifacts/contracts/Calc.sol/Calc.json').abi
- let calc = new web3.eth.Contract(CALC_ABI, contracts.CALC)
- let inAmount = 1e17.toString()
- await calc.methods.getQuote(contracts.WETH, inAmount, contracts.USDT, fee._30_per_10000).call().then(console.log)
- await calc.methods.getQuoteHandleFee(contracts.WETH, inAmount, contracts.USDT, fee._30_per_10000).call().then(console.log)
- })
- })
|