-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
1,281 additions
and
1,274 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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, | ||
// }, | ||
// }; | ||
// } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 MetaPoolInterface = new utils.Interface(require('../abis/MetaPool.json')); | ||
const MetaPoolEvents = Object.values(MetaPoolInterface.events); | ||
// const MetaPoolInterface = new utils.Interface(require('../abis/MetaPool.json')); | ||
// const MetaPoolEvents = Object.values(MetaPoolInterface.events); | ||
|
||
export function createMetaPool(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/MetaPool.ts', | ||
entities: [], | ||
eventHandlers: eventDeclarations(MetaPoolEvents), | ||
abis: [ | ||
{ | ||
name: 'MetaPool', | ||
file: 'abis/MetaPool.json', | ||
}, | ||
{ | ||
name: 'ERC20', | ||
file: 'abis/ERC20.json', | ||
}, | ||
], | ||
}, | ||
source: { | ||
abi: 'MetaPool', | ||
address, | ||
startBlock: block, | ||
}, | ||
}; | ||
} | ||
// export function createMetaPool(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/MetaPool.ts', | ||
// entities: [], | ||
// eventHandlers: eventDeclarations(MetaPoolEvents), | ||
// abis: [ | ||
// { | ||
// name: 'MetaPool', | ||
// file: 'abis/MetaPool.json', | ||
// }, | ||
// { | ||
// name: 'ERC20', | ||
// file: 'abis/ERC20.json', | ||
// }, | ||
// ], | ||
// }, | ||
// source: { | ||
// abi: 'MetaPool', | ||
// address, | ||
// startBlock: block, | ||
// }, | ||
// }; | ||
// } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 ThreePoolAssetManagerInterface = new utils.Interface(require('../abis/ThreePoolAssetManager.json')); | ||
const ThreePoolAssetManagerEvents = Object.values(ThreePoolAssetManagerInterface.events); | ||
// const ThreePoolAssetManagerInterface = new utils.Interface(require('../abis/ThreePoolAssetManager.json')); | ||
// const ThreePoolAssetManagerEvents = Object.values(ThreePoolAssetManagerInterface.events); | ||
|
||
export function createThreePoolAssetManager( | ||
name: string, | ||
block: number, | ||
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/ThreePoolAssetManager.ts', | ||
entities: [], | ||
eventHandlers: eventDeclarations(ThreePoolAssetManagerEvents), | ||
abis: [ | ||
{ | ||
name: 'ThreePoolAssetManager', | ||
file: 'abis/ThreePoolAssetManager.json', | ||
}, | ||
{ | ||
name: 'ERC20', | ||
file: 'abis/ERC20.json', | ||
}, | ||
], | ||
}, | ||
source: { | ||
abi: 'ThreePoolAssetManager', | ||
address, | ||
startBlock: block, | ||
}, | ||
}; | ||
} | ||
// export function createThreePoolAssetManager( | ||
// name: string, | ||
// block: number, | ||
// 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/ThreePoolAssetManager.ts', | ||
// entities: [], | ||
// eventHandlers: eventDeclarations(ThreePoolAssetManagerEvents), | ||
// abis: [ | ||
// { | ||
// name: 'ThreePoolAssetManager', | ||
// file: 'abis/ThreePoolAssetManager.json', | ||
// }, | ||
// { | ||
// name: 'ERC20', | ||
// file: 'abis/ERC20.json', | ||
// }, | ||
// ], | ||
// }, | ||
// source: { | ||
// abi: 'ThreePoolAssetManager', | ||
// address, | ||
// startBlock: block, | ||
// }, | ||
// }; | ||
// } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.