Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,8 @@ export enum NETWORKS {
ETHEREUM = 'ethereum',
ETHEREUMV2 = 'ethereumv2',
ZKEVM = 'zkevm',
LINEATESTNET = 'lineatestnet',
LINEA = 'linea',
POLYGON = 'polygon',
POLYGONV2 = 'polygonv2',
HARMONY = 'harmony',
Expand All @@ -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',
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 4 additions & 0 deletions env-full
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 4 additions & 0 deletions env-min
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 2 additions & 0 deletions networks/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 },
Expand Down
117 changes: 117 additions & 0 deletions networks/linea.config.ts
Original file line number Diff line number Diff line change
@@ -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,
},
};
105 changes: 105 additions & 0 deletions networks/lineatestnet.config.ts
Original file line number Diff line number Diff line change
@@ -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,
},
};
10 changes: 5 additions & 5 deletions networks/zkevm.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
{
Expand All @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion subgraph/networks/arbitrumv2.subgraph.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion subgraph/networks/avalanche.subgraph.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion subgraph/networks/avalanchev2.subgraph.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion subgraph/networks/bsc.subgraph.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
20 changes: 10 additions & 10 deletions subgraph/networks/develop.subgraph.json
Original file line number Diff line number Diff line change
@@ -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"
}
Loading