Strictest / tests / minor improvements

This commit is contained in:
Aleksandr Kraiz
2023-02-17 17:31:35 +04:00
parent 11c8348ee9
commit 2c24f71453
39 changed files with 566 additions and 128 deletions

View File

@@ -0,0 +1,39 @@
import { ethers } from 'ethers';
import Orion from '../Orion';
const privateKey = process.env['PRIVATE_KEY']
if (privateKey === undefined) throw new Error('Private key is required');
jest.setTimeout(30000);
describe('Pools', () => {
test('Add liquidity ORN', async () => {
const orion = new Orion('testing');
const bscUnit = orion.getUnit('bsc');
const wallet = new ethers.Wallet(
privateKey,
bscUnit.provider
);
await bscUnit.farmingManager.addLiquidity({
amountAsset: 'ORN',
poolName: 'ORN-USDT',
amount: 20,
signer: wallet,
});
});
test('Remove liquidity ORN', async () => {
const orion = new Orion('testing');
const bscUnit = orion.getUnit('bsc');
const wallet = new ethers.Wallet(
privateKey,
bscUnit.provider
);
await bscUnit.farmingManager.removeAllLiquidity({
poolName: 'ORN-USDT',
signer: wallet,
});
});
});