Skip to content

Commit

Permalink
without ethamo
Browse files Browse the repository at this point in the history
  • Loading branch information
toyv0 committed Jan 21, 2024
1 parent e65d7e2 commit 16fd41f
Show file tree
Hide file tree
Showing 4 changed files with 253 additions and 255 deletions.
4 changes: 2 additions & 2 deletions manifests/manifest.eth.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import 'dotenv/config';

import { createThreePoolAssetManager } from '../sources/ThreePoolAssetManager';
import { createEthAssetManager } from '../sources/EthAssetManager';
// import { createEthAssetManager } from '../sources/EthAssetManager';
import { createAlchemist } from '../sources/Alchemist';
import { createTransmuter } from '../sources/Transmuter';
import { createTransmuterBuffer } from '../sources/TransmuterBuffer';
Expand All @@ -25,7 +25,7 @@ export default {
createTransmuterBuffer('TransmuterBuffer_alUSD'),
createTransmuterBuffer('TransmuterBuffer_alETH'),
createThreePoolAssetManager('ThreePoolAssetManager_alUSD', 17265505, '0x9735F7d3Ea56b454b24fFD74C58E9bD85cfaD31B'),
createEthAssetManager('EthAssetManager', 14573961, '0xe761bf731A06fE8259FeE05897B2687D56933110'),
// createEthAssetManager('EthAssetManager', 14573961, '0xe761bf731A06fE8259FeE05897B2687D56933110'),
createMetaPool('alUSDMetaPool', '0x43b4fdfd4ff969587185cdb6f0bd875c5fc83f8c', 11955332),
createFactoryPool('alETHFactoryPool', '0xc4c319e2d4d66cca4464c0c2b32c9bd23ebe784e', 13227440),
],
Expand Down
80 changes: 40 additions & 40 deletions sources/EthAssetManager.ts
Original file line number Diff line number Diff line change
@@ -1,42 +1,42 @@
import { utils } from 'ethers';
import { eventDeclarations, deploymentAddress } from './utils/abis';
import { networkName, startBlockNumber } from './utils/constants';
import { DataSource } from './utils/types';
// import { utils } from 'ethers';
// import { eventDeclarations, deploymentAddress } from './utils/abis';
// import { networkName, startBlockNumber } from './utils/constants';
// import { DataSource } from './utils/types';

const EthAssetManagerInterface = new utils.Interface(require('../abis/EthAssetManager.json'));
const EthAssetManagerEvents = Object.values(EthAssetManagerInterface.events);
// const EthAssetManagerInterface = new utils.Interface(require('../abis/EthAssetManager.json'));
// const EthAssetManagerEvents = Object.values(EthAssetManagerInterface.events);

export function createEthAssetManager(
name: string,
block: number = startBlockNumber,
address: string = deploymentAddress(name),
): DataSource {
return {
name,
network: networkName,
kind: 'ethereum/contract',
mapping: {
apiVersion: '0.0.6',
kind: 'ethereum/events',
language: 'wasm/assemblyscript',
file: 'subgraph/handlers/EthAssetManager.ts',
entities: [],
eventHandlers: eventDeclarations(EthAssetManagerEvents),
abis: [
{
name: 'EthAssetManager',
file: 'abis/EthAssetManager.json',
},
{
name: 'ERC20',
file: 'abis/ERC20.json',
},
],
},
source: {
abi: 'EthAssetManager',
address,
startBlock: startBlockNumber,
},
};
}
// export function createEthAssetManager(
// name: string,
// block: number = startBlockNumber,
// address: string = deploymentAddress(name),
// ): DataSource {
// return {
// name,
// network: networkName,
// kind: 'ethereum/contract',
// mapping: {
// apiVersion: '0.0.6',
// kind: 'ethereum/events',
// language: 'wasm/assemblyscript',
// file: 'subgraph/handlers/EthAssetManager.ts',
// entities: [],
// eventHandlers: eventDeclarations(EthAssetManagerEvents),
// abis: [
// {
// name: 'EthAssetManager',
// file: 'abis/EthAssetManager.json',
// },
// {
// name: 'ERC20',
// file: 'abis/ERC20.json',
// },
// ],
// },
// source: {
// abi: 'EthAssetManager',
// address,
// startBlock: startBlockNumber,
// },
// };
// }
2 changes: 0 additions & 2 deletions subgraph/handlers/Alchemist.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ import {
RepayLimitUpdated,
SentinelSet,
Snap,
SweepTokens,
TokenAdapterUpdated,
TransmuterUpdated,
UnderlyingTokenEnabled,
Expand All @@ -85,7 +84,6 @@ import {
getOrCreateAlchemistGlobalDebtHistory,
getOrCreateDebtToken,
} from '../utils/entities';
import { SetTransmuter } from '../generated/TransmuterBuffer_alETH/TransmuterBuffer';

function getOrCreateAlchemist(event: ethereum.Event): Alchemist {
let entity = Alchemist.load(event.address.toHex());
Expand Down
Loading

0 comments on commit 16fd41f

Please sign in to comment.