diff --git a/constants.ts b/constants.ts index a4dfbc9..cd3c428 100644 --- a/constants.ts +++ b/constants.ts @@ -150,6 +150,8 @@ export enum NETWORKS { ETHEREUM = 'ethereum', ETHEREUMV2 = 'ethereumv2', ZKEVM = 'zkevm', + LINEATESTNET = 'lineatestnet', + LINEA = 'linea', POLYGON = 'polygon', POLYGONV2 = 'polygonv2', HARMONY = 'harmony', @@ -173,6 +175,8 @@ export const GRAPH_NETWORKS = { [NETWORKS.FANTOM]: 'mainnet', [NETWORKS.HARMONYTESTNET]: 'testnet', [NETWORKS.MUMBAI]: 'mumbai', + [NETWORKS.LINEATESTNET]: 'linea', + [NETWORKS.LINEA]: 'linea', [NETWORKS.POLYGON]: 'polygon', [NETWORKS.POLYGONV2]: 'matic', [NETWORKS.AVALANCHE]: 'avalanche', diff --git a/deployments/zkevm/.chainId b/deployments/lineatestnet/.chainId similarity index 100% rename from deployments/zkevm/.chainId rename to deployments/lineatestnet/.chainId diff --git a/deployments/zkevm/DSLA.json b/deployments/lineatestnet/DSLA.json similarity index 100% rename from deployments/zkevm/DSLA.json rename to deployments/lineatestnet/DSLA.json diff --git a/deployments/zkevm/LinkToken.json b/deployments/lineatestnet/LinkToken.json similarity index 100% rename from deployments/zkevm/LinkToken.json rename to deployments/lineatestnet/LinkToken.json diff --git a/deployments/zkevm/MessengerRegistry.json b/deployments/lineatestnet/MessengerRegistry.json similarity index 100% rename from deployments/zkevm/MessengerRegistry.json rename to deployments/lineatestnet/MessengerRegistry.json diff --git a/deployments/zkevm/Oracle.json b/deployments/lineatestnet/Oracle.json similarity index 100% rename from deployments/zkevm/Oracle.json rename to deployments/lineatestnet/Oracle.json diff --git a/deployments/zkevm/PeriodRegistry.json b/deployments/lineatestnet/PeriodRegistry.json similarity index 100% rename from deployments/zkevm/PeriodRegistry.json rename to deployments/lineatestnet/PeriodRegistry.json diff --git a/deployments/zkevm/PreCoordinator.json b/deployments/lineatestnet/PreCoordinator.json similarity index 100% rename from deployments/zkevm/PreCoordinator.json rename to deployments/lineatestnet/PreCoordinator.json diff --git a/deployments/zkevm/SLARegistry.json b/deployments/lineatestnet/SLARegistry.json similarity index 100% rename from deployments/zkevm/SLARegistry.json rename to deployments/lineatestnet/SLARegistry.json diff --git a/deployments/zkevm/SLORegistry.json b/deployments/lineatestnet/SLORegistry.json similarity index 100% rename from deployments/zkevm/SLORegistry.json rename to deployments/lineatestnet/SLORegistry.json diff --git a/deployments/zkevm/StakeRegistry.json b/deployments/lineatestnet/StakeRegistry.json similarity index 100% rename from deployments/zkevm/StakeRegistry.json rename to deployments/lineatestnet/StakeRegistry.json diff --git a/deployments/zkevm/StringUtils.json b/deployments/lineatestnet/StringUtils.json similarity index 100% rename from deployments/zkevm/StringUtils.json rename to deployments/lineatestnet/StringUtils.json diff --git a/deployments/zkevm/WETH.json b/deployments/lineatestnet/WETH.json similarity index 100% rename from deployments/zkevm/WETH.json rename to deployments/lineatestnet/WETH.json diff --git a/deployments/zkevm/crUSDC.json b/deployments/lineatestnet/crUSDC.json similarity index 100% rename from deployments/zkevm/crUSDC.json rename to deployments/lineatestnet/crUSDC.json diff --git a/deployments/zkevm/solcInputs/a788f80f153199d969f8c01022745d7e.json b/deployments/lineatestnet/solcInputs/a788f80f153199d969f8c01022745d7e.json similarity index 100% rename from deployments/zkevm/solcInputs/a788f80f153199d969f8c01022745d7e.json rename to deployments/lineatestnet/solcInputs/a788f80f153199d969f8c01022745d7e.json diff --git a/deployments/zkevm/solcInputs/aad72ea4ed29e56e5db394bb183e007b.json b/deployments/lineatestnet/solcInputs/aad72ea4ed29e56e5db394bb183e007b.json similarity index 100% rename from deployments/zkevm/solcInputs/aad72ea4ed29e56e5db394bb183e007b.json rename to deployments/lineatestnet/solcInputs/aad72ea4ed29e56e5db394bb183e007b.json diff --git a/deployments/zkevm/solcInputs/b47b1da8947805f3b521fd14a441e1c8.json b/deployments/lineatestnet/solcInputs/b47b1da8947805f3b521fd14a441e1c8.json similarity index 100% rename from deployments/zkevm/solcInputs/b47b1da8947805f3b521fd14a441e1c8.json rename to deployments/lineatestnet/solcInputs/b47b1da8947805f3b521fd14a441e1c8.json diff --git a/env-full b/env-full index 34ecdc2..02c8f32 100644 --- a/env-full +++ b/env-full @@ -45,6 +45,10 @@ FUJI_URI="http://localhost:1234" FUJI_WS_URI="ws://localhost:1234" FANTOM_URI="http://localhost:1234" FANTOM_WS_URI="ws://localhost:1234" +LINEA_URI="http://localhost:1234" +LINEA_WS_URI="http://localhost:1234" +LINEATESTNET_URI="http://localhost:1234" +LINEATESTNET_WS_URI="http://localhost:1234" ## External adapters DEVELOP_INDEXER_URI="http://host.docker.internal:6070" diff --git a/env-min b/env-min index 9526442..df9365b 100644 --- a/env-min +++ b/env-min @@ -42,6 +42,10 @@ FUJI_URI="http://localhost:1234" FUJI_WS_URI="ws://localhost:1234" FANTOM_URI="http://localhost:1234" FANTOM_WS_URI="ws://localhost:1234" +LINEA_URI="http://localhost:1234" +LINEA_WS_URI="http://localhost:1234" +LINEATESTNET_URI="http://localhost:1234" +LINEATESTNET_WS_URI="http://localhost:1234" ## External adapters DEVELOP_INDEXER_URI="http://host.docker.internal:6070" diff --git a/networks/index.ts b/networks/index.ts index 0d33a8f..f81aaef 100644 --- a/networks/index.ts +++ b/networks/index.ts @@ -6,6 +6,8 @@ export const networks = [ { name: NETWORKS.HARMONYTESTNET, enabled: false }, { name: NETWORKS.ETHEREUM, enabled: false }, { name: NETWORKS.ETHEREUMV2, enabled: false }, + { name: NETWORKS.LINEA, enabled: false }, + { name: NETWORKS.LINEATESTNET, enabled: false }, { name: NETWORKS.ZKEVM, enabled: false }, { name: NETWORKS.HARMONY, enabled: false }, { name: NETWORKS.POLYGON, enabled: false }, diff --git a/networks/linea.config.ts b/networks/linea.config.ts new file mode 100644 index 0000000..caf808f --- /dev/null +++ b/networks/linea.config.ts @@ -0,0 +1,117 @@ +import { + appRoot, + CONTRACT_NAMES, + PERIOD_TYPE, + SERVICE_CREDITS, + TOKEN_NAMES, + USE_CASES, +} from '../constants'; +import { EthereumERC20__factory } from '../typechain'; +import { NetworkUserConfig } from 'hardhat/types'; +import { scripts } from '../scripts.config'; +import Joi from 'joi'; + +const schema = Joi.object({ + MAINNET_MNEMONIC: Joi.string().required(), + LINEA_URI: Joi.string().required(), + STAKING_REWARDS_ADAPTER: Joi.string().required(), +}).unknown(); + +const { error, value } = schema.validate(process.env); + +if (error) { + throw new Error(`.env file validation error: ${error.message}`); +} else { + process.env = value; +} + +export const linea: NetworkUserConfig = { + chainId: 5000, + accounts: { + mnemonic: process.env.MAINNET_MNEMONIC, + }, + url: process.env.LINEA_URI, + stacktical: { + deployTokens: false, + checkPastPeriods: true, + tokens: [ + /** https://etherscan.io/tokens */ + { + factory: EthereumERC20__factory, + name: TOKEN_NAMES.DSLA, + address: '0x70359c1eeB98eb3D12eE7178359a4541ff11Cc8E', + + }, + { + factory: EthereumERC20__factory, + name: TOKEN_NAMES.DAI, + address: '0x4AF15ec2A0BD43Db75dd04E62FAA3B8EF36b00d5', + }, + { + factory: EthereumERC20__factory, + name: TOKEN_NAMES.USDC, + address: '0x176211869cA2b568f2A7D4EE941E073a821EE1ff', + }, + { + factory: EthereumERC20__factory, + name: TOKEN_NAMES.USDT, + address: '0x176211869cA2b568f2A7D4EE941E073a821EE1ff', + }, + { + factory: EthereumERC20__factory, + name: TOKEN_NAMES.WETH, + address: '0xe5D7C2a44FfDDf6b295A15c148167daaAf5Cf34f', + }, + ], + ipfs: process.env.IPFS_URI, + chainlink: { + deployLocal: false, + deleteOldJobs: false, + cleanLocalFolder: false, + nodeFunds: '1', + ethWsUrl: process.env.LINEA_URI, + nodesConfiguration: [], + }, + addresses: {}, + bootstrap: { + allowance: [], + registry: { + periods: [ + { + periodType: PERIOD_TYPE.HOURLY, + amountOfPeriods: 24, // Number of periods from now + expiredPeriods: 0, + }, + { + periodType: PERIOD_TYPE.DAILY, + amountOfPeriods: 31, // Number of periods from now + expiredPeriods: 0, + }, + { + periodType: PERIOD_TYPE.WEEKLY, + amountOfPeriods: 52, // Number of periods from now + expiredPeriods: 0, + }, + { + periodType: PERIOD_TYPE.MONTHLY, + amountOfPeriods: 12, // Number of periods from now + expiredPeriods: 0, + }, + ], + stake: { + stakingParameters: { + dslaBurnedByVerification: '100000', + dslaPlatformReward: '750', + dslaDepositByPeriod: '250000', + dslaMessengerReward: '49250', + dslaUserReward: '100000', + burnDSLA: true, + maxLeverage: '4', + }, + }, + }, + }, + messengers: [], + scripts: scripts, + }, +}; diff --git a/networks/lineatestnet.config.ts b/networks/lineatestnet.config.ts new file mode 100644 index 0000000..7e618c8 --- /dev/null +++ b/networks/lineatestnet.config.ts @@ -0,0 +1,105 @@ +import { + appRoot, + CONTRACT_NAMES, + PERIOD_TYPE, + SERVICE_CREDITS, + TOKEN_NAMES, + USE_CASES, +} from '../constants'; +import { EthereumERC20__factory } from '../typechain'; +import { NetworkUserConfig } from 'hardhat/types'; +import { scripts } from '../scripts.config'; +import Joi from 'joi'; + +const schema = Joi.object({ + MAINNET_MNEMONIC: Joi.string().required(), + LINEATESTNET_URI: Joi.string().required(), + STAKING_REWARDS_ADAPTER: Joi.string().required(), +}).unknown(); + +const { error, value } = schema.validate(process.env); + +if (error) { + throw new Error(`.env file validation error: ${error.message}`); +} else { + process.env = value; +} + +export const linea: NetworkUserConfig = { + chainId: 59140, + accounts: { + mnemonic: process.env.MAINNET_MNEMONIC, + }, + url: process.env.LINEATESTNET_URI, + stacktical: { + checkPastPeriods: true, + deployTokens: true, + tokens: [ + /** https://etherscan.io/tokens */ + { + factory: EthereumERC20__factory, + name: TOKEN_NAMES.DSLA + }, + { + factory: EthereumERC20__factory, + name: TOKEN_NAMES.crUSDC, + address: '0x964FF70695da981027c81020B1c58d833D49A640', + }, + { + factory: EthereumERC20__factory, + name: TOKEN_NAMES.WETH, + address: '0x2C1b868d6596a18e32E61B901E4060C872647b6C', + }, + ], + ipfs: process.env.IPFS_URI, + chainlink: { + deployLocal: false, + deleteOldJobs: false, + cleanLocalFolder: false, + nodeFunds: '1', + ethWsUrl: process.env.LINEATESTNET_URI, + nodesConfiguration: [], + }, + addresses: {}, + bootstrap: { + allowance: [], + registry: { + periods: [ + { + periodType: PERIOD_TYPE.HOURLY, + amountOfPeriods: 24, // Number of periods from now + expiredPeriods: 0, + }, + { + periodType: PERIOD_TYPE.DAILY, + amountOfPeriods: 31, // Number of periods from now + expiredPeriods: 0, + }, + { + periodType: PERIOD_TYPE.WEEKLY, + amountOfPeriods: 52, // Number of periods from now + expiredPeriods: 0, + }, + { + periodType: PERIOD_TYPE.MONTHLY, + amountOfPeriods: 12, // Number of periods from now + expiredPeriods: 0, + }, + ], + stake: { + stakingParameters: { + dslaBurnedByVerification: '100000', + dslaPlatformReward: '750', + dslaDepositByPeriod: '250000', + dslaMessengerReward: '49250', + dslaUserReward: '100000', + burnDSLA: true, + maxLeverage: '4', + }, + }, + }, + }, + messengers: [], + scripts: scripts, + }, +}; diff --git a/networks/zkevm.config.ts b/networks/zkevm.config.ts index 196b259..05212d3 100644 --- a/networks/zkevm.config.ts +++ b/networks/zkevm.config.ts @@ -26,14 +26,14 @@ if (error) { } export const zkevm: NetworkUserConfig = { - chainId: 59140, + chainId: 1101, accounts: { mnemonic: process.env.MAINNET_MNEMONIC, }, url: process.env.ZKEVM_URI, stacktical: { checkPastPeriods: true, - deployTokens: true, + deployTokens: false, tokens: [ /** https://etherscan.io/tokens */ { @@ -42,13 +42,13 @@ export const zkevm: NetworkUserConfig = { }, { factory: EthereumERC20__factory, - name: TOKEN_NAMES.crUSDC, - address: '0x964FF70695da981027c81020B1c58d833D49A640', + name: TOKEN_NAMES.USDC, + address: '0xA8CE8aee21bC2A48a5EF670afCc9274C7bbbC035', }, { factory: EthereumERC20__factory, name: TOKEN_NAMES.WETH, - address: '0x2C1b868d6596a18e32E61B901E4060C872647b6C', + address: '0x4F9A0e7FD2Bf6067db6994CF12E4495Df938E6e9', }, ], ipfs: process.env.IPFS_URI, diff --git a/subgraph/networks/arbitrumv2.subgraph.yaml b/subgraph/networks/arbitrumv2.subgraph.yaml index 44a13b3..d309eb5 100644 --- a/subgraph/networks/arbitrumv2.subgraph.yaml +++ b/subgraph/networks/arbitrumv2.subgraph.yaml @@ -114,7 +114,7 @@ templates: eventHandlers: - event: SLICreated(uint256,uint256,uint256) handler: handleSLICreated - - event: Stake(indexed address,indexed uint256,indexed address,uint256) + - event: Stake(indexed address,indexed uint256,indexed address,uint256,uint8) handler: handleStake - event: ProviderWithdraw(indexed address,indexed uint256,indexed address,uint256) handler: handleProviderWithdraw diff --git a/subgraph/networks/avalanche.subgraph.yaml b/subgraph/networks/avalanche.subgraph.yaml index c803439..0441cf9 100644 --- a/subgraph/networks/avalanche.subgraph.yaml +++ b/subgraph/networks/avalanche.subgraph.yaml @@ -114,7 +114,7 @@ templates: eventHandlers: - event: SLICreated(uint256,uint256,uint256) handler: handleSLICreated - - event: Stake(indexed address,indexed uint256,indexed address,uint256) + - event: Stake(indexed address,indexed uint256,indexed address,uint256,uint8) handler: handleStake - event: ProviderWithdraw(indexed address,indexed uint256,indexed address,uint256) handler: handleProviderWithdraw diff --git a/subgraph/networks/avalanchev2.subgraph.yaml b/subgraph/networks/avalanchev2.subgraph.yaml index 7a9c096..ddcee7a 100644 --- a/subgraph/networks/avalanchev2.subgraph.yaml +++ b/subgraph/networks/avalanchev2.subgraph.yaml @@ -114,7 +114,7 @@ templates: eventHandlers: - event: SLICreated(uint256,uint256,uint256) handler: handleSLICreated - - event: Stake(indexed address,indexed uint256,indexed address,uint256) + - event: Stake(indexed address,indexed uint256,indexed address,uint256,uint8) handler: handleStake - event: ProviderWithdraw(indexed address,indexed uint256,indexed address,uint256) handler: handleProviderWithdraw diff --git a/subgraph/networks/bsc.subgraph.yaml b/subgraph/networks/bsc.subgraph.yaml index 6979da5..eb88e64 100644 --- a/subgraph/networks/bsc.subgraph.yaml +++ b/subgraph/networks/bsc.subgraph.yaml @@ -114,7 +114,7 @@ templates: eventHandlers: - event: SLICreated(uint256,uint256,uint256) handler: handleSLICreated - - event: Stake(indexed address,indexed uint256,indexed address,uint256) + - event: Stake(indexed address,indexed uint256,indexed address,uint256,uint8) handler: handleStake - event: ProviderWithdraw(indexed address,indexed uint256,indexed address,uint256) handler: handleProviderWithdraw diff --git a/subgraph/networks/develop.subgraph.json b/subgraph/networks/develop.subgraph.json index 26204eb..f0c1063 100644 --- a/subgraph/networks/develop.subgraph.json +++ b/subgraph/networks/develop.subgraph.json @@ -1,13 +1,13 @@ { - "slaRegistryAddress": "0x5b9b42d6e4B2e4Bf8d42Eba32D46918e10899B66", - "slaRegistryStartBlock": 35, - "sloRegistryAddress": "0xA586074FA4Fe3E546A132a16238abe37951D41fE", - "sloRegistryStartBlock": 32, - "stakeRegistryAddress": "0x970e8f18ebfEa0B08810f33a5A40438b9530FBCF", - "stakeRegistryStartBlock": 34, - "messengerRegistryAddress": "0x2D8BE6BF0baA74e0A907016679CaE9190e80dD0A", - "messengerRegistryStartBlock": 33, - "periodRegistryAddress": "0xFF6049B87215476aBf744eaA3a476cBAd46fB1cA", - "periodRegistryStartBlock": 31, + "slaRegistryAddress": "0x0E696947A06550DEf604e82C26fd9E493e576337", + "slaRegistryStartBlock": 17, + "sloRegistryAddress": "0xA57B8a5584442B467b4689F1144D269d096A3daF", + "sloRegistryStartBlock": 14, + "stakeRegistryAddress": "0x630589690929E9cdEFDeF0734717a9eF3Ec7Fcfe", + "stakeRegistryStartBlock": 16, + "messengerRegistryAddress": "0x26b4AFb60d6C903165150C6F0AA14F8016bE4aec", + "messengerRegistryStartBlock": 15, + "periodRegistryAddress": "0x2612Af3A521c2df9EAF28422Ca335b04AdF3ac66", + "periodRegistryStartBlock": 13, "graphNetwork": "mainnet" } diff --git a/subgraph/networks/develop.subgraph.yaml b/subgraph/networks/develop.subgraph.yaml index 2a26361..a93c867 100644 --- a/subgraph/networks/develop.subgraph.yaml +++ b/subgraph/networks/develop.subgraph.yaml @@ -8,8 +8,8 @@ dataSources: name: SLARegistry network: mainnet source: - address: "0x5b9b42d6e4B2e4Bf8d42Eba32D46918e10899B66" - startBlock: 35 + address: "0x0E696947A06550DEf604e82C26fd9E493e576337" + startBlock: 17 abi: SLARegistry mapping: kind: ethereum/events @@ -30,8 +30,8 @@ dataSources: name: SLORegistry network: mainnet source: - address: "0xA586074FA4Fe3E546A132a16238abe37951D41fE" - startBlock: 32 + address: "0xA57B8a5584442B467b4689F1144D269d096A3daF" + startBlock: 14 abi: SLORegistry mapping: kind: ethereum/events @@ -52,8 +52,8 @@ dataSources: name: StakeRegistry network: mainnet source: - address: "0x970e8f18ebfEa0B08810f33a5A40438b9530FBCF" - startBlock: 34 + address: "0x630589690929E9cdEFDeF0734717a9eF3Ec7Fcfe" + startBlock: 16 abi: StakeRegistry mapping: kind: ethereum/events @@ -74,8 +74,8 @@ dataSources: name: MessengerRegistry network: mainnet source: - address: "0x2D8BE6BF0baA74e0A907016679CaE9190e80dD0A" - startBlock: 33 + address: "0x26b4AFb60d6C903165150C6F0AA14F8016bE4aec" + startBlock: 15 abi: MessengerRegistry mapping: kind: ethereum/events @@ -114,7 +114,7 @@ templates: eventHandlers: - event: SLICreated(uint256,uint256,uint256) handler: handleSLICreated - - event: Stake(indexed address,indexed uint256,indexed address,uint256) + - event: Stake(indexed address,indexed uint256,indexed address,uint256,uint8) handler: handleStake - event: ProviderWithdraw(indexed address,indexed uint256,indexed address,uint256) handler: handleProviderWithdraw diff --git a/subgraph/networks/develop_avalanche.subgraph.yaml b/subgraph/networks/develop_avalanche.subgraph.yaml index f4c84f7..de90349 100644 --- a/subgraph/networks/develop_avalanche.subgraph.yaml +++ b/subgraph/networks/develop_avalanche.subgraph.yaml @@ -114,7 +114,7 @@ templates: eventHandlers: - event: SLICreated(uint256,uint256,uint256) handler: handleSLICreated - - event: Stake(indexed address,indexed uint256,indexed address,uint256) + - event: Stake(indexed address,indexed uint256,indexed address,uint256,uint8) handler: handleStake - event: ProviderWithdraw(indexed address,indexed uint256,indexed address,uint256) handler: handleProviderWithdraw diff --git a/subgraph/networks/ethereum.subgraph.yaml b/subgraph/networks/ethereum.subgraph.yaml index 18ba39f..bd1719f 100644 --- a/subgraph/networks/ethereum.subgraph.yaml +++ b/subgraph/networks/ethereum.subgraph.yaml @@ -114,7 +114,7 @@ templates: eventHandlers: - event: SLICreated(uint256,uint256,uint256) handler: handleSLICreated - - event: Stake(indexed address,indexed uint256,indexed address,uint256) + - event: Stake(indexed address,indexed uint256,indexed address,uint256,uint8) handler: handleStake - event: ProviderWithdraw(indexed address,indexed uint256,indexed address,uint256) handler: handleProviderWithdraw diff --git a/subgraph/networks/ethereumv2.subgraph.yaml b/subgraph/networks/ethereumv2.subgraph.yaml index 3e4144f..f095d61 100644 --- a/subgraph/networks/ethereumv2.subgraph.yaml +++ b/subgraph/networks/ethereumv2.subgraph.yaml @@ -114,7 +114,7 @@ templates: eventHandlers: - event: SLICreated(uint256,uint256,uint256) handler: handleSLICreated - - event: Stake(indexed address,indexed uint256,indexed address,uint256) + - event: Stake(indexed address,indexed uint256,indexed address,uint256,uint8) handler: handleStake - event: ProviderWithdraw(indexed address,indexed uint256,indexed address,uint256) handler: handleProviderWithdraw diff --git a/subgraph/networks/fantom.subgraph.yaml b/subgraph/networks/fantom.subgraph.yaml index 54c43dc..b5788af 100644 --- a/subgraph/networks/fantom.subgraph.yaml +++ b/subgraph/networks/fantom.subgraph.yaml @@ -114,7 +114,7 @@ templates: eventHandlers: - event: SLICreated(uint256,uint256,uint256) handler: handleSLICreated - - event: Stake(indexed address,indexed uint256,indexed address,uint256) + - event: Stake(indexed address,indexed uint256,indexed address,uint256,uint8) handler: handleStake - event: ProviderWithdraw(indexed address,indexed uint256,indexed address,uint256) handler: handleProviderWithdraw diff --git a/subgraph/networks/fuji.subgraph.yaml b/subgraph/networks/fuji.subgraph.yaml index c064d6a..df02530 100644 --- a/subgraph/networks/fuji.subgraph.yaml +++ b/subgraph/networks/fuji.subgraph.yaml @@ -114,7 +114,7 @@ templates: eventHandlers: - event: SLICreated(uint256,uint256,uint256) handler: handleSLICreated - - event: Stake(indexed address,indexed uint256,indexed address,uint256) + - event: Stake(indexed address,indexed uint256,indexed address,uint256,uint8) handler: handleStake - event: ProviderWithdraw(indexed address,indexed uint256,indexed address,uint256) handler: handleProviderWithdraw diff --git a/subgraph/networks/harmony.subgraph.yaml b/subgraph/networks/harmony.subgraph.yaml index b6b2ed8..73c381c 100644 --- a/subgraph/networks/harmony.subgraph.yaml +++ b/subgraph/networks/harmony.subgraph.yaml @@ -114,7 +114,7 @@ templates: eventHandlers: - event: SLICreated(uint256,uint256,uint256) handler: handleSLICreated - - event: Stake(indexed address,indexed uint256,indexed address,uint256) + - event: Stake(indexed address,indexed uint256,indexed address,uint256,uint8) handler: handleStake - event: ProviderWithdraw(indexed address,indexed uint256,indexed address,uint256) handler: handleProviderWithdraw diff --git a/subgraph/networks/harmonytestnet.subgraph.yaml b/subgraph/networks/harmonytestnet.subgraph.yaml index e02d0bd..d0a1d98 100644 --- a/subgraph/networks/harmonytestnet.subgraph.yaml +++ b/subgraph/networks/harmonytestnet.subgraph.yaml @@ -114,7 +114,7 @@ templates: eventHandlers: - event: SLICreated(uint256,uint256,uint256) handler: handleSLICreated - - event: Stake(indexed address,indexed uint256,indexed address,uint256) + - event: Stake(indexed address,indexed uint256,indexed address,uint256,uint8) handler: handleStake - event: ProviderWithdraw(indexed address,indexed uint256,indexed address,uint256) handler: handleProviderWithdraw diff --git a/subgraph/networks/lineatestnet.subgraph.json b/subgraph/networks/lineatestnet.subgraph.json new file mode 100644 index 0000000..fcdd599 --- /dev/null +++ b/subgraph/networks/lineatestnet.subgraph.json @@ -0,0 +1,13 @@ +{ + "slaRegistryAddress": "0x9986B2ec991D58954A3AE6f3Ab754FFE2EDE21a4", + "slaRegistryStartBlock": 257829, + "sloRegistryAddress": "0x7a257FAC68626827e5f6d46A9D5416a6D6B38464", + "sloRegistryStartBlock": 257826, + "stakeRegistryAddress": "0xe744E91660683765feDC36893D05bCC4B5Ac29C4", + "stakeRegistryStartBlock": 257828, + "messengerRegistryAddress": "0xddB17A5368ACA9FEdaF427FFbc2EDBDD5c00FafF", + "messengerRegistryStartBlock": 257827, + "periodRegistryAddress": "0x05223875f0a5Df90666dA1Eb054e584fF9eAE4F8", + "periodRegistryStartBlock": 257825, + "graphNetwork": "linea" +} diff --git a/subgraph/networks/lineatestnet.subgraph.yaml b/subgraph/networks/lineatestnet.subgraph.yaml new file mode 100644 index 0000000..d8540db --- /dev/null +++ b/subgraph/networks/lineatestnet.subgraph.yaml @@ -0,0 +1,129 @@ +specVersion: 0.0.4 +description: DSLA protocol +repository: https://github.com/Stacktical/stacktical-dsla-contracts +schema: + file: ../schema.graphql +dataSources: + - kind: ethereum/contract + name: SLARegistry + network: linea + source: + address: "0x9986B2ec991D58954A3AE6f3Ab754FFE2EDE21a4" + startBlock: 257829 + abi: SLARegistry + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + entities: + - SLA + abis: + - name: SLARegistry + file: ../abis/SLARegistry.json + - name: SLA + file: ../abis/SLA.json + eventHandlers: + - event: SLACreated(indexed address,indexed address) + handler: handleNewSLA + file: ../mapping.ts + - kind: ethereum/contract + name: SLORegistry + network: linea + source: + address: "0x7a257FAC68626827e5f6d46A9D5416a6D6B38464" + startBlock: 257826 + abi: SLORegistry + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + entities: + - SLA + abis: + - name: SLORegistry + file: ../abis/SLORegistry.json + - name: SLA + file: ../abis/SLA.json + eventHandlers: + - event: SLORegistered(indexed address,uint256,uint8) + handler: handleSLORegistered + file: ../mapping.ts + - kind: ethereum/contract + name: StakeRegistry + network: linea + source: + address: "0xe744E91660683765feDC36893D05bCC4B5Ac29C4" + startBlock: 257828 + abi: StakeRegistry + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + entities: + - StakeRegistry + abis: + - name: StakeRegistry + file: ../abis/StakeRegistry.json + eventHandlers: + - event: ValueLocked(indexed address,indexed address,uint256) + handler: handleValueLocked + - event: LockedValueReturned(indexed address,indexed address,uint256) + handler: handleLockedValueReturned + file: ../mapping.ts + - kind: ethereum/contract + name: MessengerRegistry + network: linea + source: + address: "0xddB17A5368ACA9FEdaF427FFbc2EDBDD5c00FafF" + startBlock: 257827 + abi: MessengerRegistry + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + entities: + - MessengerRegistry + - IMessenger + abis: + - name: MessengerRegistry + file: ../abis/MessengerRegistry.json + - name: IMessenger + file: ../abis/IMessenger.json + eventHandlers: + - event: MessengerRegistered(indexed address,indexed address,string,uint256,uint256) + handler: handleMessengerRegistered + - event: MessengerModified(indexed address,indexed address,string,uint256,uint256) + handler: handleMessengerModified + file: ../mapping.ts +templates: + - kind: ethereum/contract + name: SLA + network: linea + source: + abi: SLA + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + file: ../mapping.ts + entities: + - SLA + - DToken + - ERC20 + - SLI + eventHandlers: + - event: SLICreated(uint256,uint256,uint256) + handler: handleSLICreated + - event: Stake(indexed address,indexed uint256,indexed address,uint256,uint8) + handler: handleStake + - event: ProviderWithdraw(indexed address,indexed uint256,indexed address,uint256) + handler: handleProviderWithdraw + - event: UserWithdraw(indexed address,indexed uint256,indexed address,uint256) + handler: handleUserWithdraw + - event: DTokensCreated(indexed address,indexed address,string,string,indexed address,string,string) + handler: handleDTokensCreated + abis: + - name: SLA + file: ../abis/SLA.json + - name: ERC20 + file: ../abis/ERC20PresetMinterPauser.json diff --git a/subgraph/networks/polygon.subgraph.yaml b/subgraph/networks/polygon.subgraph.yaml index 0845c33..de1628d 100644 --- a/subgraph/networks/polygon.subgraph.yaml +++ b/subgraph/networks/polygon.subgraph.yaml @@ -114,7 +114,7 @@ templates: eventHandlers: - event: SLICreated(uint256,uint256,uint256) handler: handleSLICreated - - event: Stake(indexed address,indexed uint256,indexed address,uint256) + - event: Stake(indexed address,indexed uint256,indexed address,uint256,uint8) handler: handleStake - event: ProviderWithdraw(indexed address,indexed uint256,indexed address,uint256) handler: handleProviderWithdraw diff --git a/subgraph/networks/polygonv2.subgraph.yaml b/subgraph/networks/polygonv2.subgraph.yaml index 08dd0d2..fa264e9 100644 --- a/subgraph/networks/polygonv2.subgraph.yaml +++ b/subgraph/networks/polygonv2.subgraph.yaml @@ -114,7 +114,7 @@ templates: eventHandlers: - event: SLICreated(uint256,uint256,uint256) handler: handleSLICreated - - event: Stake(indexed address,indexed uint256,indexed address,uint256) + - event: Stake(indexed address,indexed uint256,indexed address,uint256,uint8) handler: handleStake - event: ProviderWithdraw(indexed address,indexed uint256,indexed address,uint256) handler: handleProviderWithdraw diff --git a/subgraph/networks/rinkeby.subgraph.json b/subgraph/networks/rinkeby.subgraph.json index 906b352..b6e1ccb 100644 --- a/subgraph/networks/rinkeby.subgraph.json +++ b/subgraph/networks/rinkeby.subgraph.json @@ -8,6 +8,5 @@ "messengerRegistryAddress": "0x45D5E52AFB831a56B7c667222522c944f797A858", "messengerRegistryStartBlock": 9091464, "periodRegistryAddress": "0x3E89f98519D9577A9370D9fbd74d642EEf733915", - "periodRegistryStartBlock": 9091462, - "graphNetwork": "rinkeby" + "periodRegistryStartBlock": 9091462 } diff --git a/subgraph/networks/rinkeby.subgraph.yaml b/subgraph/networks/rinkeby.subgraph.yaml index c65c449..5edfcff 100644 --- a/subgraph/networks/rinkeby.subgraph.yaml +++ b/subgraph/networks/rinkeby.subgraph.yaml @@ -6,7 +6,7 @@ schema: dataSources: - kind: ethereum/contract name: SLARegistry - network: rinkeby + network: source: address: "0x285F560A7E35754b4283Fc63321090C7DA758535" startBlock: 9091468 @@ -28,7 +28,7 @@ dataSources: file: ../mapping.ts - kind: ethereum/contract name: SLORegistry - network: rinkeby + network: source: address: "0xCCdc0BBE69D428485241b3f322cf308c57AEf409" startBlock: 9091463 @@ -50,7 +50,7 @@ dataSources: file: ../mapping.ts - kind: ethereum/contract name: StakeRegistry - network: rinkeby + network: source: address: "0x598C8BeD2fA8d82959550DD82d9C942B917B9b99" startBlock: 9091465 @@ -72,7 +72,7 @@ dataSources: file: ../mapping.ts - kind: ethereum/contract name: MessengerRegistry - network: rinkeby + network: source: address: "0x45D5E52AFB831a56B7c667222522c944f797A858" startBlock: 9091464 @@ -98,7 +98,7 @@ dataSources: templates: - kind: ethereum/contract name: SLA - network: rinkeby + network: source: abi: SLA mapping: @@ -114,7 +114,7 @@ templates: eventHandlers: - event: SLICreated(uint256,uint256,uint256) handler: handleSLICreated - - event: Stake(indexed address,indexed uint256,indexed address,uint256) + - event: Stake(indexed address,indexed uint256,indexed address,uint256,uint8) handler: handleStake - event: ProviderWithdraw(indexed address,indexed uint256,indexed address,uint256) handler: handleProviderWithdraw diff --git a/subgraph/subgraph.template.yaml b/subgraph/subgraph.template.yaml index 0c0e60a..24cf8a3 100644 --- a/subgraph/subgraph.template.yaml +++ b/subgraph/subgraph.template.yaml @@ -114,7 +114,7 @@ templates: eventHandlers: - event: SLICreated(uint256,uint256,uint256) handler: handleSLICreated - - event: Stake(indexed address,indexed uint256,indexed address,uint256) + - event: Stake(indexed address,indexed uint256,indexed address,uint256,uint8) handler: handleStake - event: ProviderWithdraw(indexed address,indexed uint256,indexed address,uint256) handler: handleProviderWithdraw