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

fix: typechain structure #501

Merged
merged 5 commits into from
Jan 26, 2023
Merged

fix: typechain structure #501

merged 5 commits into from
Jan 26, 2023

Conversation

defispartan
Copy link
Collaborator

@defispartan defispartan commented Jan 26, 2023

The current migration typechain is causing warnings which are blocking ci. This standardizes the typechain setup to match existing pattern and resolve warnings.

Error: Webpack Compilation Error
/home/runner/work/interface/interface/node_modules/@aave/contract-helpers/dist/esm/v3-migration-contract/typechain/index.js 2:9
Module parse failed: Unexpected token (2:9)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
| /* Autogenerated file. Do not edit manually. */
> export * as factories from './factories';
| export { IMigrationHelper__factory } from './factories/IMigrationHelper__factory';

Disables unsafe assignement linting for migration service, the typing of this file should be fixed in the future, issue #502.

@height
Copy link

height bot commented Jan 26, 2023

Link Height tasks by mentioning a task ID in the pull request title or commit messages, or description and comments with the keyword link (e.g. "Link T-123").

💡Tip: You can also use "Close T-X" to automatically close a task when the pull request is merged.

@github-actions
Copy link

🎉 Canary Release
To install use
npm install @aave/[email protected]+698bb3f
npm install @aave/contract-helpers@1.13.3-3ae5e6aa5a5b5d48f2fade2527bf3ee0f885e575.0+698bb3f

'packages/contract-helpers/src/index.ts',
'packages/math-utils/src/formatters/reserve/index.ts', // TODO: remove
],
modulePathIgnorePatterns: ['node_modules'],
preset: 'ts-jest',
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

this is duplicated above ^

@defispartan defispartan merged commit 70f3c4f into master Jan 26, 2023
@defispartan defispartan deleted the fix/v3-migration-typechain branch January 26, 2023 21:34
grothem pushed a commit that referenced this pull request Feb 7, 2023
* feat: add default gas estimation for borrow and vote (#492)

* feat: add default gas estimation for borrow

* chore: add default estimation for vote

* chore(release): publish [ci skip]

 - @aave/[email protected]
 - @aave/[email protected]

* fix: apply default gas limit estimations (#499)

* fix: apply default gas limit estimations

* chore: update vote estimate

* fix: update remaining actions

* chore: update gas limit tests for v3 pool

* chore: update gas limits tests for v2 pool

* chore: update gas limits tests for voting

* chore: revert v3 pool rollup changes

* chore(release): publish [ci skip]

 - @aave/[email protected]
 - @aave/[email protected]

* chore: change migration on v3 from flash loan to use credit delegation (#493)

* feat: v3 migration services added

* feat: erc20-2612 export and test for v3 migration added

* feat: migration service types

* feat: migrate no borrow without permits

* feat: migrate v3 with borrow continue

* fix: pass permits to flashloan v3

* fix: added test for migrateV3 and fixed some types

* fix: remove approval tx if permits passed

* fix: approve txs in migrate with permits

* fix: added 100% coverage

* fix: fixed ingores

* feat: add migrate method

* fix: add tests

* fix: added credit delegation approval

* fix: separate v3 variable debt approval for migraiton v3

* fix: updated tests

* feat: add get migration supply method added

* fix: get migration supply test added

* fix: get migration supply test

Co-authored-by: sendra <[email protected]>

* chore(release): publish [ci skip]

 - @aave/[email protected]
 - @aave/[email protected]

* fix: typechain structure (#501)

* fix: typechain structure

* chore: disable typescript linting for migration service

* chore: add type to permit mapping

* fix: migration typechain import and unused config

* fix: factory typechain import

* chore(release): publish [ci skip]

 - @aave/[email protected]
 - @aave/[email protected]

* fix: check for liq threshold in place of ltv for user collateral check (#505)

* chore(release): publish [ci skip]

 - @aave/[email protected]
 - @aave/[email protected]

* fix: Fix typos (#486)

* chore(release): publish [ci skip]

 - @aave/[email protected]
 - @aave/[email protected]

* feat: decentralize the readme header image

* chore: remove legacy files

* feat: update uighodataprovider typechain and references (#507)

* feat: custom version for gho beta [skip ci]

* chore(release): [skip ci]

 - @aave/[email protected]
 - @aave/[email protected]

* chore: remove readme line

* chore: revert attempt for custom custom version

---------

Co-authored-by: GitHub Actions Build <[email protected]>
Co-authored-by: Dmitry Petrov <[email protected]>
Co-authored-by: sendra <[email protected]>
Co-authored-by: Dimitris Apostolou <[email protected]>
grothem added a commit that referenced this pull request Jul 14, 2023
* feat: add in GhoDiscountRateStrategyService (#443)

* feat: add in typechain and setup base GhoDiscountRateService

* chore: add in type definition files

* chore: add in basic calculateDiscountRate function and unit test

* fix: skip unit test for now

* fix: allow to commit to repo and bypass jest coverage limit

* chore: write utility for calculating discount rate

* fix: write unit tests for all use cases for discount rates

* fix: write unit test for barrel file

* chore: jest config and export gho service

* fix: use zero values and mock return calls

* fix: test coverage and mocks

* chore: remove unnecessary coverage skips

* feat: add in GhoTokenService for totalSupply & facilitator info (#444)

* feat: add in GhoTokenService and getFacilitatorBucket

* fix: typo

* feat: add in more utils for GhoTokenService

* feat: add in GhoVariableDebtTokenService & getters for debt strategy constants (#446)

* chore: move existing test files to __tests__ dir

* chore: add in typechain types

* feat: add in GhoVariableDebtTokenService with methods and tests

* feat: add in getters and tests for GhoDiscountRateStrategy constants

* chore: update discount rate strategy source (#447)

* feat: add getDiscountRateStrategy to ghoVariableDebtTokenService

* feat: use ghoVariableDebtToken as source of discount strategy address

* feat: add test for discountRateStrategy update

* feat: add function for getting reserve data from lending pool (#451)

* feat: add function for getting reserve data from lending pool

* test: getReserveData

* feat: add in GhoDiscountRateStrategyService (#443)

* feat: add in typechain and setup base GhoDiscountRateService

* chore: add in type definition files

* chore: add in basic calculateDiscountRate function and unit test

* fix: skip unit test for now

* fix: allow to commit to repo and bypass jest coverage limit

* chore: write utility for calculating discount rate

* fix: write unit tests for all use cases for discount rates

* fix: write unit test for barrel file

* chore: jest config and export gho service

* fix: use zero values and mock return calls

* fix: test coverage and mocks

* chore: remove unnecessary coverage skips

* feat: add in GhoTokenService for totalSupply & facilitator info (#444)

* feat: add in GhoTokenService and getFacilitatorBucket

* fix: typo

* feat: add in more utils for GhoTokenService

* feat: add in GhoVariableDebtTokenService & getters for debt strategy constants (#446)

* chore: move existing test files to __tests__ dir

* chore: add in typechain types

* feat: add in GhoVariableDebtTokenService with methods and tests

* feat: add in getters and tests for GhoDiscountRateStrategy constants

* chore: update discount rate strategy source (#447)

* feat: add getDiscountRateStrategy to ghoVariableDebtTokenService

* feat: use ghoVariableDebtToken as source of discount strategy address

* feat: add test for discountRateStrategy update

* feat: add function for getting reserve data from lending pool (#451)

* feat: add function for getting reserve data from lending pool

* test: getReserveData

* chore: sync gho base with upstream (#472)

* feat: add default gas estimation for permit actions (#461)

* chore(release): publish [ci skip]

 - @aave/[email protected]
 - @aave/[email protected]

Co-authored-by: DeFi Spartan <[email protected]>
Co-authored-by: GitHub Actions Build <[email protected]>

* chore/export compounding rate helper (#462)

* chore: export compounded rate helper

* chore: use compounded rate helper in formatReserves

* fix: add in plumbing for exporting calc compound rate

* chore: remove duplicated function and update refs

Co-authored-by: Drew Cook <[email protected]>

* fix: build error

* feat: gho sdk (#466)

* feat: add in GhoDiscountRateStrategyService (#443)

* feat: add in typechain and setup base GhoDiscountRateService

* chore: add in type definition files

* chore: add in basic calculateDiscountRate function and unit test

* fix: skip unit test for now

* fix: allow to commit to repo and bypass jest coverage limit

* chore: write utility for calculating discount rate

* fix: write unit tests for all use cases for discount rates

* fix: write unit test for barrel file

* chore: jest config and export gho service

* fix: use zero values and mock return calls

* fix: test coverage and mocks

* chore: remove unnecessary coverage skips

* feat: add in GhoTokenService for totalSupply & facilitator info (#444)

* feat: add in GhoTokenService and getFacilitatorBucket

* fix: typo

* feat: add in more utils for GhoTokenService

* feat: add in GhoVariableDebtTokenService & getters for debt strategy constants (#446)

* chore: move existing test files to __tests__ dir

* chore: add in typechain types

* feat: add in GhoVariableDebtTokenService with methods and tests

* feat: add in getters and tests for GhoDiscountRateStrategy constants

* chore: update discount rate strategy source (#447)

* feat: add getDiscountRateStrategy to ghoVariableDebtTokenService

* feat: use ghoVariableDebtToken as source of discount strategy address

* feat: add test for discountRateStrategy update

* feat: add function for getting reserve data from lending pool (#451)

* feat: add function for getting reserve data from lending pool

* test: getReserveData

* chore: export compounded rate helper

* chore: use compounded rate helper in formatReserves

* fix: add in plumbing for exporting calc compound rate

* chore: remove duplicated function and update refs

* feat: add fetchGhoData wrapper service

* feat: add formatGhoData utility function

* chore: re-add exports

* fix: discountLockPeriod decimal formatting

* feat: export gho formatter

* feat: facilitator percentage minted

* chore: swap string to number in gho formatter

* chore: use object destructuring for facilitatorInfo

* chore: rename fields and add userGhoBorrowBalance

* fix: facilitatorAddress parameter

* fix: facilitator info typo

* chore: remove userGhoBorrowBalance from service and formatter

* chore: split user and reserve services and add fields for user borrow balance

* chore: split user and reserve formatters

* fix: use correct service for scaledBalance and previousIndex

* chore: export discounted gho interest to factor into total borrows

* feat: add Ui helper contract typechain

* feat: use helper contract in GhoService

* chore: purge unused gho services

* feat: helper function to account for gho discount in user summary

* feat: update discount summary helper and add tests

* chore: remove old comment

Co-authored-by: Drew Cook <[email protected]>
Co-authored-by: Mark Grothe <[email protected]>

* chore: cleanup

* chore: update staking permit (#485)

* feat: fetch nonce inside staking signature generation

* fix: nonce test

* feat: add deadline parameter

* fix: blank nonce test coverage

* feat: add staking default gas estimation

* chore: revert dynamic deadline which contract does not support

* feat: gho testnet (#506)

* feat: add default gas estimation for borrow and vote (#492)

* feat: add default gas estimation for borrow

* chore: add default estimation for vote

* chore(release): publish [ci skip]

 - @aave/[email protected]
 - @aave/[email protected]

* fix: apply default gas limit estimations (#499)

* fix: apply default gas limit estimations

* chore: update vote estimate

* fix: update remaining actions

* chore: update gas limit tests for v3 pool

* chore: update gas limits tests for v2 pool

* chore: update gas limits tests for voting

* chore: revert v3 pool rollup changes

* chore(release): publish [ci skip]

 - @aave/[email protected]
 - @aave/[email protected]

* chore: change migration on v3 from flash loan to use credit delegation (#493)

* feat: v3 migration services added

* feat: erc20-2612 export and test for v3 migration added

* feat: migration service types

* feat: migrate no borrow without permits

* feat: migrate v3 with borrow continue

* fix: pass permits to flashloan v3

* fix: added test for migrateV3 and fixed some types

* fix: remove approval tx if permits passed

* fix: approve txs in migrate with permits

* fix: added 100% coverage

* fix: fixed ingores

* feat: add migrate method

* fix: add tests

* fix: added credit delegation approval

* fix: separate v3 variable debt approval for migraiton v3

* fix: updated tests

* feat: add get migration supply method added

* fix: get migration supply test added

* fix: get migration supply test

Co-authored-by: sendra <[email protected]>

* chore(release): publish [ci skip]

 - @aave/[email protected]
 - @aave/[email protected]

* fix: typechain structure (#501)

* fix: typechain structure

* chore: disable typescript linting for migration service

* chore: add type to permit mapping

* fix: migration typechain import and unused config

* fix: factory typechain import

* chore(release): publish [ci skip]

 - @aave/[email protected]
 - @aave/[email protected]

* fix: check for liq threshold in place of ltv for user collateral check (#505)

* chore(release): publish [ci skip]

 - @aave/[email protected]
 - @aave/[email protected]

* fix: Fix typos (#486)

* chore(release): publish [ci skip]

 - @aave/[email protected]
 - @aave/[email protected]

* feat: decentralize the readme header image

* chore: remove legacy files

* feat: update uighodataprovider typechain and references (#507)

* feat: custom version for gho beta [skip ci]

* chore(release): [skip ci]

 - @aave/[email protected]
 - @aave/[email protected]

* chore: remove readme line

* chore: revert attempt for custom custom version

---------

Co-authored-by: GitHub Actions Build <[email protected]>
Co-authored-by: Dmitry Petrov <[email protected]>
Co-authored-by: sendra <[email protected]>
Co-authored-by: Dimitris Apostolou <[email protected]>

* feat: gho uighodataprovider update (#526)

* feat: update uighodataprovider typechain

* feat: update usage of discountLockPeriod in gho service

* feat: gho base update (#536)

* feat: add Scroll Alpha chainId (#528)

* chore(release): publish [ci skip]

 - @aave/[email protected]
 - @aave/[email protected]

* feat: update borrow methods SDK (#527)

* feat: updated borrow methods + test for L2Pool

* feat: updated borrow methods + test for WETHGateway

* feat: update  borrow methods on V3 pool bundle + tests

* feat: update borrow methods on V2 bundle + tests

* chore: add wethgateway test coverage

* feat: add generateApproveDelegationTxData helper function + tests

* feat: numeric credit delegation approved amount instead of boolean

* chore(release): publish [ci skip]

 - @aave/[email protected]
 - @aave/[email protected]

* fix: apply default gas limits (#533)

* chore: add approval and approveDelegation gasLimitRecommendations

* fix: apply default gas limit estimations to all tx data generation methods

* feat: fixed available debt in isolated reserve in case that debt > ma… (#532)

* feat: fixed available debt in isolated reserve in case that debt > max debt

* feat: add isolation mode ceiling exceeded test

* chore: remove comment

---------

Co-authored-by: aschmidt20 <[email protected]>

* chore(release): publish [ci skip]

 - @aave/[email protected]
 - @aave/[email protected]

---------

Co-authored-by: Daniel Helm <[email protected]>
Co-authored-by: GitHub Actions Build <[email protected]>
Co-authored-by: JoaquinBattilana <[email protected]>

* fix: check that user has required amount of token for discount (#539)

* fix: check that user has required amount of token for discount

* test: unit itest for not having enough discount token for discount

* fix: bad merge

* fix: typings

* chore: cleanup unnecessary changes

* chore: more file cleanup

* chore: update stakeWithPermit to directly call function on  StkAave token

* chore: update signStaking and stakeWithPermit tests

* chore: add ProtocolAction to stakeWithPermit

* fix: signStakingApproval spender

---------

Co-authored-by: Drew Cook <[email protected]>
Co-authored-by: Andrew Schmidt <[email protected]>
Co-authored-by: GitHub Actions Build <[email protected]>
Co-authored-by: Dmitry Petrov <[email protected]>
Co-authored-by: sendra <[email protected]>
Co-authored-by: Dimitris Apostolou <[email protected]>
Co-authored-by: Daniel Helm <[email protected]>
Co-authored-by: JoaquinBattilana <[email protected]>
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