Skip to content

Commit

Permalink
holesky dev
Browse files Browse the repository at this point in the history
  • Loading branch information
mtabasco committed Oct 11, 2023
1 parent 16e2da5 commit a35cc6b
Show file tree
Hide file tree
Showing 5 changed files with 325 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
GOERLI_ETH_NODE_URL=
GOERLI_OWNER_PRIVATE_KEY=
HOLESKY_ETH_NODE_URL=
HOLESKY_OWNER_PRIVATE_KEY=
MAINNET_ETH_NODE_URL=
MAINNET_OWNER_PRIVATE_KEY=
GAS_PRICE=
Expand Down
253 changes: 253 additions & 0 deletions .openzeppelin/unknown-17000.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,253 @@
{
"manifestVersion": "3.2",
"proxies": [
{
"address": "0x0d33801785340072C452b994496B19f196b7eE15",
"txHash": "0x9c6605dab4a2d23e480bf90f476b34498bd6d7a4e3c232835544bd8c94971427",
"kind": "uups"
},
{
"address": "0x656d5cC4e7d49EaCC063cBB8D3e072F2841D68b4",
"txHash": "0x05fec282860f01d95aa19fea01907f0e377d529685c33da59dd0b7c85f96b0b2",
"kind": "uups"
}
],
"impls": {
"d876760172e5575262f8fe267daaa9f5045a6c995da21c74c61e769c00d0cb79": {
"address": "0x116522F4D00b42Efce0aA77f7ddAd1d27705F36b",
"txHash": "0xd04d7ebb1f3211c5006d965f1c3762c866e8eb77027428ab8989904b4af28a16",
"layout": {
"solcVersion": "0.8.18",
"storage": [
{
"label": "_initialized",
"offset": 0,
"slot": "0",
"type": "t_uint8",
"contract": "Initializable",
"src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:63",
"retypedFrom": "bool"
},
{
"label": "_initializing",
"offset": 1,
"slot": "0",
"type": "t_bool",
"contract": "Initializable",
"src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:68"
},
{
"label": "__gap",
"offset": 0,
"slot": "1",
"type": "t_array(t_uint256)50_storage",
"contract": "ERC1967UpgradeUpgradeable",
"src": "@openzeppelin/contracts-upgradeable/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol:169"
},
{
"label": "__gap",
"offset": 0,
"slot": "51",
"type": "t_array(t_uint256)50_storage",
"contract": "UUPSUpgradeable",
"src": "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol:111"
},
{
"label": "__gap",
"offset": 0,
"slot": "101",
"type": "t_array(t_uint256)50_storage",
"contract": "ContextUpgradeable",
"src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36"
},
{
"label": "_owner",
"offset": 0,
"slot": "151",
"type": "t_address",
"contract": "OwnableUpgradeable",
"src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22"
},
{
"label": "__gap",
"offset": 0,
"slot": "152",
"type": "t_array(t_uint256)49_storage",
"contract": "OwnableUpgradeable",
"src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94"
},
{
"label": "_pendingOwner",
"offset": 0,
"slot": "201",
"type": "t_address",
"contract": "Ownable2StepUpgradeable",
"src": "@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol:27"
},
{
"label": "__gap",
"offset": 0,
"slot": "202",
"type": "t_array(t_uint256)49_storage",
"contract": "Ownable2StepUpgradeable",
"src": "@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol:70"
}
],
"types": {
"t_address": {
"label": "address",
"numberOfBytes": "20"
},
"t_array(t_uint256)49_storage": {
"label": "uint256[49]",
"numberOfBytes": "1568"
},
"t_array(t_uint256)50_storage": {
"label": "uint256[50]",
"numberOfBytes": "1600"
},
"t_bool": {
"label": "bool",
"numberOfBytes": "1"
},
"t_uint256": {
"label": "uint256",
"numberOfBytes": "32"
},
"t_uint8": {
"label": "uint8",
"numberOfBytes": "1"
}
}
}
},
"368acb5d5852996f01c66abefb8ca54bce00f1977c8aaed5efcf0c75f250303d": {
"address": "0xa9d0096bdbf97401F1B5E8D5330Ee8b7f0cb975D",
"txHash": "0x6fbd987b485c9f50a953b1ad38de6bcca366fbe9f9cb1ae88d81aa9b085fb3c6",
"layout": {
"solcVersion": "0.8.18",
"storage": [
{
"label": "_initialized",
"offset": 0,
"slot": "0",
"type": "t_uint8",
"contract": "Initializable",
"src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:63",
"retypedFrom": "bool"
},
{
"label": "_initializing",
"offset": 1,
"slot": "0",
"type": "t_bool",
"contract": "Initializable",
"src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:68"
},
{
"label": "__gap",
"offset": 0,
"slot": "1",
"type": "t_array(t_uint256)50_storage",
"contract": "ERC1967UpgradeUpgradeable",
"src": "@openzeppelin/contracts-upgradeable/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol:169"
},
{
"label": "__gap",
"offset": 0,
"slot": "51",
"type": "t_array(t_uint256)50_storage",
"contract": "UUPSUpgradeable",
"src": "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol:111"
},
{
"label": "__gap",
"offset": 0,
"slot": "101",
"type": "t_array(t_uint256)50_storage",
"contract": "ContextUpgradeable",
"src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36"
},
{
"label": "_owner",
"offset": 0,
"slot": "151",
"type": "t_address",
"contract": "OwnableUpgradeable",
"src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22"
},
{
"label": "__gap",
"offset": 0,
"slot": "152",
"type": "t_array(t_uint256)49_storage",
"contract": "OwnableUpgradeable",
"src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94"
},
{
"label": "_pendingOwner",
"offset": 0,
"slot": "201",
"type": "t_address",
"contract": "Ownable2StepUpgradeable",
"src": "@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol:27"
},
{
"label": "__gap",
"offset": 0,
"slot": "202",
"type": "t_array(t_uint256)49_storage",
"contract": "Ownable2StepUpgradeable",
"src": "@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol:70"
},
{
"label": "ssvNetwork",
"offset": 0,
"slot": "251",
"type": "t_contract(ISSVViews)4269",
"contract": "SSVNetworkViews",
"src": "contracts/SSVNetworkViews.sol:19"
},
{
"label": "private__gap",
"offset": 0,
"slot": "252",
"type": "t_array(t_uint256)50_storage",
"contract": "SSVNetworkViews",
"src": "contracts/SSVNetworkViews.sol:23"
}
],
"types": {
"t_address": {
"label": "address",
"numberOfBytes": "20"
},
"t_array(t_uint256)49_storage": {
"label": "uint256[49]",
"numberOfBytes": "1568"
},
"t_array(t_uint256)50_storage": {
"label": "uint256[50]",
"numberOfBytes": "1600"
},
"t_bool": {
"label": "bool",
"numberOfBytes": "1"
},
"t_contract(ISSVViews)4269": {
"label": "contract ISSVViews",
"numberOfBytes": "20"
},
"t_uint256": {
"label": "uint256",
"numberOfBytes": "32"
},
"t_uint8": {
"label": "uint8",
"numberOfBytes": "1"
}
}
}
}
}
}
23 changes: 23 additions & 0 deletions contracts/token/SSVToken.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity 0.8.4;

import "@openzeppelin/contracts/utils/Context.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol";

/**
* @title SSV Token
*/
contract SSVToken is Ownable, ERC20, ERC20Burnable {
constructor() ERC20("SSV Token", "SSV") {
}

/**
* @dev Mint tokens
* @param to The target address
* @param amount The amount of token to mint
*/
function mint(address to, uint256 amount) external onlyOwner {
_mint(to, amount);
}
}
36 changes: 35 additions & 1 deletion hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ const config: HardhatUserConfig = {
},
solidity: {
compilers: [
{
version: "0.8.4",
},
{
version: '0.8.18',
settings: {
Expand All @@ -48,7 +51,17 @@ const config: HardhatUserConfig = {
etherscan: {
// Your API key for Etherscan
// Obtain one at https://etherscan.io/
apiKey: process.env.ETHERSCAN_KEY
apiKey: process.env.ETHERSCAN_KEY,
customChains: [
{
network: "holesky",
chainId: 17000,
urls: {
apiURL: "https://api-holesky.etherscan.io/api",
browserURL: "https://holesky.etherscan.io"
}
}
]
},
gasReporter: {
enabled: true,
Expand Down Expand Up @@ -78,6 +91,27 @@ if (process.env.GOERLI_ETH_NODE_URL) {
}
}

if (process.env.HOLESKY_ETH_NODE_URL) {
const sharedConfig = {
url: process.env.HOLESKY_ETH_NODE_URL,
accounts: [`0x${process.env.HOLESKY_OWNER_PRIVATE_KEY}`],
gasPrice: +(process.env.GAS_PRICE || ''),
gas: +(process.env.GAS || ''),
};
//@ts-ignore
config.networks = {
...config.networks,
holesky_development: {
...sharedConfig,
ssvToken: '0x68A8DDD7a59A900E0657e9f8bbE02B70c947f25F'
} as SSVNetworkConfig,
holesky_testnet: {
...sharedConfig,
ssvToken: ''
} as SSVNetworkConfig,
}
}

if (process.env.MAINNET_ETH_NODE_URL) {
//@ts-ignore
config.networks = {
Expand Down
12 changes: 12 additions & 0 deletions tasks/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,18 @@ subtask("deploy:module", "Deploys a new module contract")
return moduleAddress;
});

task("deploy:token", "Deploys SSV Token")
.setAction(async ({ }, hre) => {
console.log('Deploying SSV Network Token');

const ssvTokenFactory = await ethers.getContractFactory('SSVToken');
const ssvToken = await ssvTokenFactory.deploy();
await ssvToken.deployed();

console.log(`SSV Network Token deployed to: ${ssvToken.address}`);

});

/**
* @title Hardhat subtask to deploy or fetch an SSV Token contract.
* The ssvToken parameter in the hardhat's network section, specifies the address of the SSV Token contract.
Expand Down

0 comments on commit a35cc6b

Please sign in to comment.