Skip to content

Commit

Permalink
temp: rfq tests
Browse files Browse the repository at this point in the history
  • Loading branch information
KanievskyiDanylo committed Jan 17, 2025
1 parent 422ac4d commit a07b8c3
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 14 deletions.
16 changes: 8 additions & 8 deletions src/dex/generic-rfq/e2e-test-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ export const testConfig: {
amount: string;
}>;
} = {
[Network.ARBITRUM]: [
{
srcToken: 'WETH',
destToken: 'USDC',
amount: '10000',
swapSide: SwapSide.BUY,
},
[Network.MAINNET]: [
// {
// srcToken: 'USDT',
// destToken: 'USDC',
// amount: '10000',
// swapSide: SwapSide.BUY,
// },
{
srcToken: 'USDC',
destToken: 'WETH',
destToken: 'USDT',
amount: '10000',
swapSide: SwapSide.SELL,
},
Expand Down
10 changes: 6 additions & 4 deletions src/dex/generic-rfq/generic-rfq-e2e.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,18 +118,20 @@ describe(`GenericRFQ ${dexKey} E2E`, () => {
srcToken = smartTokens[testCase.srcToken];
destToken = smartTokens[testCase.destToken];

srcToken.addBalance(testAccount.address, MAX_UINT);
const amount = (BigInt(MAX_UINT) / 10n ** 10n).toString();

srcToken.addBalance(testAccount.address, amount);
srcToken.addAllowance(
testAccount.address,
config.augustusRFQAddress,
MAX_UINT,
amount,
);

destToken.addBalance(testAccount.address, MAX_UINT);
destToken.addBalance(testAccount.address, amount);
destToken.addAllowance(
testAccount.address,
config.augustusRFQAddress,
MAX_UINT,
amount,
);
}
const contractMethod =
Expand Down
2 changes: 1 addition & 1 deletion tests/constants-e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ export const Tokens: {
address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48',
decimals: 6,
symbol: 'USDC',
addBalance: balancesFn,
addBalance: balanceAndBlacklistStatesFn,
addAllowance: allowedFn,
},
INST: {
Expand Down
2 changes: 1 addition & 1 deletion tests/utils-e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -702,7 +702,7 @@ export async function newTestE2E({
stateOverrides: {},
};

destToken.addBalance(GIFTER_ADDRESS, MAX_UINT);
destToken.addBalance(GIFTER_ADDRESS, (BigInt(MAX_UINT) / 4n).toString());
destToken.applyOverrides(stateOverrides);

const giftTx = makeFakeTransferToSenderAddress(
Expand Down

0 comments on commit a07b8c3

Please sign in to comment.