Skip to content

Commit

Permalink
add factorypool
Browse files Browse the repository at this point in the history
  • Loading branch information
toyv0 committed Jan 22, 2024
1 parent 2942279 commit a0e6a72
Show file tree
Hide file tree
Showing 3 changed files with 466 additions and 466 deletions.
4 changes: 2 additions & 2 deletions manifests/manifest.eth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { createAlchemist } from '../sources/Alchemist';
import { createTransmuter } from '../sources/Transmuter';
import { createTransmuterBuffer } from '../sources/TransmuterBuffer';
// import { createMetaPool } from '../sources/MetaPool';
// import { createFactoryPool } from '../sources/FactoryPool';
import { createFactoryPool } from '../sources/FactoryPool';

export default {
specVersion: '0.0.4',
Expand All @@ -27,6 +27,6 @@ export default {
// createThreePoolAssetManager('ThreePoolAssetManager_alUSD', 17265505, '0x9735F7d3Ea56b454b24fFD74C58E9bD85cfaD31B'),
// createEthAssetManager('EthAssetManager', 14573961, '0xe761bf731A06fE8259FeE05897B2687D56933110'),
// createMetaPool('alUSDMetaPool', '0x43b4fdfd4ff969587185cdb6f0bd875c5fc83f8c', 11955332),
// createFactoryPool('alETHFactoryPool', '0xc4c319e2d4d66cca4464c0c2b32c9bd23ebe784e', 13227440),
createFactoryPool('alETHFactoryPool', '0xc4c319e2d4d66cca4464c0c2b32c9bd23ebe784e', 13227440),
],
};
72 changes: 36 additions & 36 deletions sources/FactoryPool.ts
Original file line number Diff line number Diff line change
@@ -1,38 +1,38 @@
// import { utils } from 'ethers';
// import { eventDeclarations } from './utils/abis';
// import { networkName, startBlockNumber } from './utils/constants';
// import { DataSource } from './utils/types';
import { utils } from 'ethers';
import { eventDeclarations } from './utils/abis';
import { networkName, startBlockNumber } from './utils/constants';
import { DataSource } from './utils/types';

// const FactoryPoolInterface = new utils.Interface(require('../abis/FactoryPool.json'));
// const FactoryPoolEvents = Object.values(FactoryPoolInterface.events);
const FactoryPoolInterface = new utils.Interface(require('../abis/FactoryPool.json'));
const FactoryPoolEvents = Object.values(FactoryPoolInterface.events);

// export function createFactoryPool(name: string, address: string, block: number): DataSource {
// return {
// name,
// network: networkName,
// kind: 'ethereum/contract',
// mapping: {
// apiVersion: '0.0.6',
// kind: 'ethereum/events',
// language: 'wasm/assemblyscript',
// file: 'subgraph/handlers/FactoryPool.ts',
// entities: [],
// eventHandlers: eventDeclarations(FactoryPoolEvents),
// abis: [
// {
// name: 'FactoryPool',
// file: 'abis/FactoryPool.json',
// },
// {
// name: 'ERC20',
// file: 'abis/ERC20.json',
// },
// ],
// },
// source: {
// abi: 'FactoryPool',
// address,
// startBlock: block,
// },
// };
// }
export function createFactoryPool(name: string, address: string, block: number): DataSource {
return {
name,
network: networkName,
kind: 'ethereum/contract',
mapping: {
apiVersion: '0.0.6',
kind: 'ethereum/events',
language: 'wasm/assemblyscript',
file: 'subgraph/handlers/FactoryPool.ts',
entities: [],
eventHandlers: eventDeclarations(FactoryPoolEvents),
abis: [
{
name: 'FactoryPool',
file: 'abis/FactoryPool.json',
},
{
name: 'ERC20',
file: 'abis/ERC20.json',
},
],
},
source: {
abi: 'FactoryPool',
address,
startBlock: block,
},
};
}
Loading

0 comments on commit a0e6a72

Please sign in to comment.