Skip to content

Commit

Permalink
3pool
Browse files Browse the repository at this point in the history
  • Loading branch information
toyv0 committed Jan 23, 2024
1 parent dc267bb commit a806a3d
Show file tree
Hide file tree
Showing 4 changed files with 301 additions and 302 deletions.
4 changes: 2 additions & 2 deletions manifests/manifest.eth.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import 'dotenv/config';

// import { createThreePoolAssetManager } from '../sources/ThreePoolAssetManager';
import { createThreePoolAssetManager } from '../sources/ThreePoolAssetManager';
// import { createEthAssetManager } from '../sources/EthAssetManager';
import { createAlchemist } from '../sources/Alchemist';
import { createTransmuter } from '../sources/Transmuter';
Expand All @@ -24,7 +24,7 @@ export default {
createTransmuter('TransmuterV2_ETH'),
createTransmuterBuffer('TransmuterBuffer_alUSD'),
createTransmuterBuffer('TransmuterBuffer_alETH'),
// createThreePoolAssetManager('ThreePoolAssetManager_alUSD', 17265505, '0x9735F7d3Ea56b454b24fFD74C58E9bD85cfaD31B'),
createThreePoolAssetManager('ThreePoolAssetManager_alUSD', 17265505, '0x9735F7d3Ea56b454b24fFD74C58E9bD85cfaD31B'),
// createEthAssetManager('EthAssetManager', 14573961, '0xe761bf731A06fE8259FeE05897B2687D56933110'),
createMetaPool('alUSDMetaPool', '0x43b4fdfd4ff969587185cdb6f0bd875c5fc83f8c', 11955332),
createFactoryPool('alETHFactoryPool', '0xc4c319e2d4d66cca4464c0c2b32c9bd23ebe784e', 13227440),
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
"deploy-dev": "export NETWORK_NAME=mainnet; graph deploy alchemix-finance/alchemix_v2_dev subgraph.js --product hosted-service --skip-migrations",
"deploy-ftm": "export NETWORK_NAME=fantom; graph deploy alchemix-finance/alchemix_v2_ftm subgraph.ftm.js --product hosted-service --skip-migrations",
"deploy-peg": "graph deploy alchemix-finance/alcx-curve-dev subgraph.js --product hosted-service --skip-migrations",
"deploy-alchemy": "graph deploy alchemix-dev subgraph.js --version-label v0.0.1 --node https://subgraphs.alchemy.com/api/subgraphs/deploy --deploy-key js5R3UE6N675Z --ipfs https://ipfs.satsuma.xyz",
"lint": "prettier --ignore-path .gitignore --list-different \"**/*.{ts,js,json,yaml}\""
},
"devDependencies": {
Expand Down
80 changes: 40 additions & 40 deletions sources/ThreePoolAssetManager.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 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,
},
};
}
Loading

0 comments on commit a806a3d

Please sign in to comment.