Skip to content

Commit

Permalink
refactor: fix lint issues + removed debug logs
Browse files Browse the repository at this point in the history
  • Loading branch information
schystz committed Nov 9, 2023
1 parent f129d63 commit 0fcd112
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/mappings/helpers/misc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
TradePairSnapshot,
BalancerSnapshot,
Balancer,
FXOracle
FXOracle,
} from '../../types/schema';
import { ERC20 } from '../../types/Vault/ERC20';
import { WeightedPool } from '../../types/Vault/WeightedPool';
Expand Down
11 changes: 1 addition & 10 deletions src/mappings/poolFactory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import {
} from './helpers/misc';
import { updatePoolWeights } from './helpers/weighted';

import { BigInt, Address, Bytes, ethereum, log } from '@graphprotocol/graph-ts';
import { BigInt, Address, Bytes, ethereum } from '@graphprotocol/graph-ts';
import { PoolCreated } from '../types/WeightedPoolFactory/WeightedPoolFactory';
import { AaveLinearPoolCreated } from '../types/AaveLinearPoolV3Factory/AaveLinearPoolV3Factory';
import { ProtocolIdRegistered } from '../types/ProtocolIdRegistry/ProtocolIdRegistry';
Expand Down Expand Up @@ -637,23 +637,14 @@ function handleNewFXPool(event: ethereum.Event, permissionless: boolean): void {
for (let i = 0; i < tokensAddresses.length; i++) {
let tokenAddress = tokensAddresses[i];
let assimCall = poolContract.try_assimilator(tokenAddress);
log.warning('[JAMES-DEBUG] Token assim: {} = {}', [tokenAddress.toHexString(), assimCall.value.toHexString()]);
if (assimCall.reverted) continue;

let assimContract = Assimilator.bind(assimCall.value);
let oracleCall = assimContract.try_oracle();
log.warning('[JAMES-DEBUG] Assim oracle: {} = {}', [
assimCall.value.toHexString(),
oracleCall.value.toHexString(),
]);
if (oracleCall.reverted) continue;

let oracleContract = ChainlinkPriceFeed.bind(oracleCall.value);
let aggregatorCall = oracleContract.try_aggregator();
log.warning('[JAMES-DEBUG] Oracle agregator: {} = {}', [
oracleCall.value.toHexString(),
aggregatorCall.value.toHexString(),
]);
if (aggregatorCall.reverted) continue;

// Create OffchainAggregator template
Expand Down

0 comments on commit 0fcd112

Please sign in to comment.