Skip to content

Commit

Permalink
Add Support for all Comet instances on Base (#58)
Browse files Browse the repository at this point in the history
* base support

* test env vars

* add supported networks to test case
  • Loading branch information
ajb413 authored Aug 16, 2023
1 parent 1c2ed21 commit cfcd35c
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
with:
node-version: 18.x
# Installs deps and builds
- run: MAINNET_PROVIDER_URL=${{ secrets.MAINNET_PROVIDER_URL }} POLYGON_PROVIDER_URL=${{ secrets.POLYGON_PROVIDER_URL }} ARBITRUM_PROVIDER_URL=${{ secrets.ARBITRUM_PROVIDER_URL }} GOERLI_PROVIDER_URL=${{ secrets.GOERLI_PROVIDER_URL }} MUMBAI_PROVIDER_URL=${{ secrets.MUMBAI_PROVIDER_URL }} GOERLI_ARBITRUM_PROVIDER_URL=${{ secrets.GOERLI_ARBITRUM_PROVIDER_URL }} GOERLI_OPTIMISM_PROVIDER_URL=${{ secrets.GOERLI_OPTIMISM_PROVIDER_URL }} FUJI_PROVIDER_URL=${{ secrets.FUJI_PROVIDER_URL }} npm install
- run: MAINNET_PROVIDER_URL=${{ secrets.MAINNET_PROVIDER_URL }} POLYGON_PROVIDER_URL=${{ secrets.POLYGON_PROVIDER_URL }} ARBITRUM_PROVIDER_URL=${{ secrets.ARBITRUM_PROVIDER_URL }} GOERLI_PROVIDER_URL=${{ secrets.GOERLI_PROVIDER_URL }} MUMBAI_PROVIDER_URL=${{ secrets.MUMBAI_PROVIDER_URL }} GOERLI_ARBITRUM_PROVIDER_URL=${{ secrets.GOERLI_ARBITRUM_PROVIDER_URL }} GOERLI_OPTIMISM_PROVIDER_URL=${{ secrets.GOERLI_OPTIMISM_PROVIDER_URL }} FUJI_PROVIDER_URL=${{ secrets.FUJI_PROVIDER_URL }} GOERLI_BASE_PROVIDER_URL=${{ secrets.GOERLI_BASE_PROVIDER_URL }} BASE_PROVIDER_URL=${{ secrets.BASE_PROVIDER_URL }} npm install
# Runs tests
- run: MAINNET_PROVIDER_URL=${{ secrets.MAINNET_PROVIDER_URL }} npm run test_coverage
# Updates code coverage badge in readme
Expand Down
12 changes: 12 additions & 0 deletions scripts/comet-spider.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/comet-artifacts/comet-constants.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -239,8 +239,8 @@ export function getNetNameWithChainId(chainId: number) : string {
43113: 'ava-fuji',
// 250: 'fantom',
// 4002: 'fantom-testnet',
// 8453: 'base',
// 84531: 'base-goerli',
8453: 'base',
84531: 'base-goerli',
// 59140: 'linea-goerli',
// 1101: 'matic-zkevm',
// 1442: 'matic-zkevm-testnet',
Expand Down
2 changes: 1 addition & 1 deletion test/comet.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -997,7 +997,7 @@ module.exports = function suite([ publicKeys, privateKeys ]) {
});

it('runs comet.getSupportedDeployments', async function () {
const expected = '["mainnet_usdc","mainnet_weth","polygon_usdc","arbitrum_usdc","goerli_usdc","goerli_weth","mumbai_usdc","goerli_arbitrum_usdc","goerli_optimism_usdc","fuji_usdc"]';
const expected = '["mainnet_usdc","mainnet_weth","polygon_usdc","arbitrum_usdc","base_usdbc","base_weth","goerli_usdc","goerli_weth","mumbai_usdc","goerli_arbitrum_usdc","goerli_optimism_usdc","goerli_base_usdc","goerli_base_weth","fuji_usdc"]';
let nets;
try {
nets = Compound.comet.getSupportedDeployments();
Expand Down

0 comments on commit cfcd35c

Please sign in to comment.