Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing the gyroEV2.integration.spec.ts tests; #416

Merged
merged 1 commit into from
Sep 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 9 additions & 10 deletions test/gyroEV2.integration.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ import { setUp } from './testScripts/utils';
dotenv.config();

const networkId = Network.POLYGON;
const jsonRpcUrl = '';
const jsonRpcUrl = process.env.RPC_URL_POLYGON ?? '';
const rpcUrl = 'http://127.0.0.1:8137';
const provider = new JsonRpcProvider(rpcUrl, networkId);
const blocknumber = 42173266;
const blocknumber = 47427007;

const vault = Vault__factory.connect(vaultAddr, provider);

Expand Down Expand Up @@ -64,7 +64,7 @@ const gyroEV2PoolWMATIC_stMATIC_POLYGON: SubgraphPoolBase = {
dSq: '0.9999999999999999988662409334210612',
};

describe.skip('gyroEV2: WMATIC-stMATIC integration tests', () => {
describe('gyroEV2: WMATIC-stMATIC integration tests', () => {
let sor: SOR;
const funds = {
sender: AddressZero,
Expand All @@ -91,21 +91,20 @@ describe.skip('gyroEV2: WMATIC-stMATIC integration tests', () => {
it('should return no swaps when above limit', async () => {
const tokenIn = ADDRESSES[Network.POLYGON].WMATIC.address;
const tokenOut = ADDRESSES[Network.POLYGON].stMATIC.address;
const swapAmount = parseFixed('33.33333333333333', 18);
const swapAmount = parseFixed('100000000', 18);
const swapInfo = await sor.getSwaps(
tokenIn,
tokenOut,
swapType,
swapAmount
);

expect(swapInfo.swaps.length).to.eq(0);
expect(swapInfo.returnAmount.toString()).to.eq('0');
});
it('token > LSD, getSwaps result should match queryBatchSwap', async () => {
const tokenIn = ADDRESSES[Network.POLYGON].WMATIC.address;
const tokenOut = ADDRESSES[Network.POLYGON].stMATIC.address;
const swapAmount = parseFixed('1.12345678', 18);
const swapAmount = parseFixed('1603426', 18);
const swapInfo = await sor.getSwaps(
tokenIn,
tokenOut,
Expand All @@ -130,7 +129,7 @@ describe.skip('gyroEV2: WMATIC-stMATIC integration tests', () => {
it('LSD > token, getSwaps result should match queryBatchSwap', async () => {
const tokenIn = ADDRESSES[Network.POLYGON].stMATIC.address;
const tokenOut = ADDRESSES[Network.POLYGON].WMATIC.address;
const swapAmount = parseFixed('0.999', 18);
const swapAmount = parseFixed('160342', 18);
const swapInfo = await sor.getSwaps(
tokenIn,
tokenOut,
Expand Down Expand Up @@ -160,7 +159,7 @@ describe.skip('gyroEV2: WMATIC-stMATIC integration tests', () => {
it('should return no swaps when above limit', async () => {
const tokenIn = ADDRESSES[Network.POLYGON].WMATIC.address;
const tokenOut = ADDRESSES[Network.POLYGON].stMATIC.address;
const swapAmount = parseFixed('100', 18);
const swapAmount = parseFixed('100000000', 18);
const swapInfo = await sor.getSwaps(
tokenIn,
tokenOut,
Expand All @@ -174,7 +173,7 @@ describe.skip('gyroEV2: WMATIC-stMATIC integration tests', () => {
it('token > LSD, getSwaps result should match queryBatchSwap', async () => {
const tokenIn = ADDRESSES[Network.POLYGON].WMATIC.address;
const tokenOut = ADDRESSES[Network.POLYGON].stMATIC.address;
const swapAmount = parseFixed('1.987654321', 18);
const swapAmount = parseFixed('1603426', 18);
const swapInfo = await sor.getSwaps(
tokenIn,
tokenOut,
Expand All @@ -198,7 +197,7 @@ describe.skip('gyroEV2: WMATIC-stMATIC integration tests', () => {
it('LSD > token, getSwaps result should match queryBatchSwap', async () => {
const tokenIn = ADDRESSES[Network.POLYGON].stMATIC.address;
const tokenOut = ADDRESSES[Network.POLYGON].WMATIC.address;
const swapAmount = parseFixed('0.999', 18);
const swapAmount = parseFixed('1603420', 18);
const swapInfo = await sor.getSwaps(
tokenIn,
tokenOut,
Expand Down
2 changes: 1 addition & 1 deletion test/xaveFxPool.polygon.integration.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ const xaveFxPoolXSGD_USDC_POLYGON: SubgraphPoolBase = {
epsilon: '0.0005',
};

describe.skip('xaveFxPool: DAI-USDC integration (Polygon) tests', () => {
describe('xaveFxPool: DAI-USDC integration (Polygon) tests', () => {
context('test swaps vs queryBatchSwap', () => {
// Setup chain
before(async function () {
Expand Down
Loading