Skip to content

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
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.


it('Initialize the pool', async () => {
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

Development

Successfully merging this pull request may close these issues.

2 participants