mirror of
https://github.com/orionprotocol/sdk.git
synced 2026-04-02 02:57:59 +03:00
Strictest / tests / minor improvements
This commit is contained in:
39
src/__tests__/pools.test.ts
Normal file
39
src/__tests__/pools.test.ts
Normal 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,
|
||||
});
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user