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

Partial fills #26

Open
wants to merge 9 commits into
base: partial_fills
Choose a base branch
from

Conversation

vinaykumar0103
Copy link

Description

Type of change

  • Bug fix
  • New feature
  • Breaking change
  • Dependency changes
  • Code refactor / cleanup
  • Documentation or wording changes
  • Other

Checklist:

  • The diff is legible and has no extraneous changes
  • Complex code has been commented, including external interfaces
  • Tests are included for all code paths
  • The base branch is either master, or there's a description of how to merge

Issue Resolution

worked on test cases
worked on test cases create pool,join pool(swap) test cases.
update
working on primary Pool test case
added and upgrade
@@ -12,21 +13,22 @@ import { getSigner, impersonate, impersonateWhale } from '../../../src/signers';
import { MAX_UINT256 } from '@balancer-labs/v2-helpers/src/constants';
import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/dist/src/signer-with-address';

describeForkTest('PrimaryPoolFactory', 'goerli', 8586768, function () {
describeForkTest('PrimaryPoolFactory', 'mainnet', 8586768, function () {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vinaykumar0103 we do not have a deployment of the primary pool on mainnet. It is on goerli, can you check with goerli ? The VCUSD and other addresses are also for goerli only.

await usdc.connect(whale).approve(vault.address, MAX_UINT256);
await usdc.connect(whale).approve(vault.address, MAX_UINT256);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vinaykumar0103 should this approval be for VCUSD ? We already have given approval for USDC in the above line.

await vault
.connect(owner)
.swap(
{ kind: SwapKind.GivenIn, poolId, assetIn: usdc, assetOut: usdc, amount, userData: '0x' },
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vinaykumar0103 swap assetIn and assetOut are the same ? They should be different. And 'amount' of assets swapped in should be there in balance.


const provider = new ethers.providers.JsonRpcProvider();
const ownerBalance = await provider.getBalance(ownerAddress);
console.log("Owner's ETH balance: ", ownerBalance.toString());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vinaykumar0103 why are you checking ETH balance ? You should check if swapped in asset balance is available. assetIn and assetOut (ie, USDC and VCUSD) are ERC20 tokens.

update VCUSD address and update approve issues
change mainnet to goerli,and resolve approve issues and replace VCUSD whale new address
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants