Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Review] Balance calculation when operators will be removed #284

Merged
merged 10 commits into from
Dec 11, 2023
2 changes: 1 addition & 1 deletion contracts/SSVNetworkViews.sol
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ contract SSVNetworkViews is UUPSUpgradeable, Ownable2StepUpgradeable, ISSVViews
/*******************************/
/* DAO External View Functions */
/*******************************/

function getNetworkFee() external view override returns (uint256) {
return ssvNetwork.getNetworkFee();
}
Expand Down
61 changes: 30 additions & 31 deletions hardhat.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import 'dotenv/config';

import { HardhatUserConfig } from 'hardhat/config';
import { NetworkUserConfig } from "hardhat/types";
import { NetworkUserConfig } from 'hardhat/types';
import '@nomicfoundation/hardhat-toolbox';
import '@openzeppelin/hardhat-upgrades';
import 'hardhat-tracer';
Expand All @@ -14,60 +14,59 @@ import './tasks/upgrade';

type SSVNetworkConfig = NetworkUserConfig & {
ssvToken: string;
}

};

const config: HardhatUserConfig = {
// Your type-safe config goes here
mocha: {
timeout: 40000000000000000
timeout: 40000000000000000,
},
solidity: {
compilers: [
{
version: "0.8.4",
version: '0.8.4',
},
{
version: '0.8.18',
settings: {
optimizer: {
enabled: true,
runs: 10000
}
}
}
runs: 10000,
},
},
},
],
},
networks: {
ganache: {
chainId: 1337,
url: "http://127.0.0.1:8585",
ssvToken: process.env.SSVTOKEN_ADDRESS // if empty, deploy SSV mock token
url: 'http://127.0.0.1:8585',
ssvToken: process.env.SSVTOKEN_ADDRESS, // if empty, deploy SSV mock token
} as SSVNetworkConfig,
hardhat: {
allowUnlimitedContractSize: true
}
allowUnlimitedContractSize: true,
},
},
etherscan: {
// Your API key for Etherscan
// Obtain one at https://etherscan.io/
apiKey: process.env.ETHERSCAN_KEY,
customChains: [
{
network: "holesky",
network: 'holesky',
chainId: 17000,
urls: {
apiURL: "https://api-holesky.etherscan.io/api",
browserURL: "https://holesky.etherscan.io"
}
}
]
apiURL: 'https://api-holesky.etherscan.io/api',
browserURL: 'https://holesky.etherscan.io',
},
},
],
},
gasReporter: {
enabled: true,
enabled: false,
currency: 'USD',
gasPrice: 0.3
}
gasPrice: 0.3,
},
};

if (process.env.GOERLI_ETH_NODE_URL) {
Expand All @@ -82,13 +81,13 @@ if (process.env.GOERLI_ETH_NODE_URL) {
...config.networks,
goerli_development: {
...sharedConfig,
ssvToken: '0x6471F70b932390f527c6403773D082A0Db8e8A9F'
ssvToken: '0x6471F70b932390f527c6403773D082A0Db8e8A9F',
} as SSVNetworkConfig,
goerli_testnet: {
...sharedConfig,
ssvToken: '0x3a9f01091C446bdE031E39ea8354647AFef091E7'
ssvToken: '0x3a9f01091C446bdE031E39ea8354647AFef091E7',
} as SSVNetworkConfig,
}
};
}

if (process.env.HOLESKY_ETH_NODE_URL) {
Expand All @@ -103,13 +102,13 @@ if (process.env.HOLESKY_ETH_NODE_URL) {
...config.networks,
holesky_development: {
...sharedConfig,
ssvToken: '0x68A8DDD7a59A900E0657e9f8bbE02B70c947f25F'
ssvToken: '0x68A8DDD7a59A900E0657e9f8bbE02B70c947f25F',
} as SSVNetworkConfig,
holesky_testnet: {
...sharedConfig,
ssvToken: '0xad45A78180961079BFaeEe349704F411dfF947C6'
ssvToken: '0xad45A78180961079BFaeEe349704F411dfF947C6',
} as SSVNetworkConfig,
}
};
}

if (process.env.MAINNET_ETH_NODE_URL) {
Expand All @@ -121,9 +120,9 @@ if (process.env.MAINNET_ETH_NODE_URL) {
accounts: [`0x${process.env.MAINNET_OWNER_PRIVATE_KEY}`],
gasPrice: +(process.env.GAS_PRICE || ''),
gas: +(process.env.GAS || ''),
ssvToken: '0x9D65fF81a3c488d585bBfb0Bfe3c7707c7917f54'
} as SSVNetworkConfig
}
ssvToken: '0x9D65fF81a3c488d585bBfb0Bfe3c7707c7917f54',
} as SSVNetworkConfig,
};
}

export default config;
Loading
Loading