Skip to content

Commit

Permalink
Add network specific tags to each deploy scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
wojciech-turek committed Jul 22, 2024
1 parent f001e15 commit ae59b85
Show file tree
Hide file tree
Showing 93 changed files with 751 additions and 128 deletions.
9 changes: 9 additions & 0 deletions packages/deploy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,15 @@ where:
executed ( see:[hardhat-deploy](https://github.com/wighawag/hardhat-deploy)
configuration)

- There is a specific set of tags related to network on which each script was
meant to run.
- L1 = 'L1', // Layer one networks like Ethereum mainnet, sepolia
- L1_PROD = 'L1-prod', // Layer one production networks like Ethereum mainnet
- L1_TEST = 'L1-test', // Layer one test networks like Goerli
- L2 = 'L2', // Layer two networks like Polygon, mumbai
- L2_PROD = 'L2-prod', // Layer two production networks like Polygon
- L2_TEST = 'L2-test', // Layer two test networks like Mumbai

## Upgrades

1. Modify smart contracts, add tests, and update documentation in the respective
Expand Down
9 changes: 8 additions & 1 deletion packages/deploy/deploy/000_core/001_deploy_polygon_sand.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import {DeployFunction} from 'hardhat-deploy/types';
import {HardhatRuntimeEnvironment} from 'hardhat/types';
import {DEPLOY_TAGS} from '../../hardhat.config';

const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
const {deployments, getNamedAccounts} = hre;
Expand All @@ -25,5 +26,11 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
});
};
export default func;
func.tags = ['PolygonSand', 'PolygonSand_deploy', 'L2'];
func.tags = [
'PolygonSand',
'PolygonSand_deploy',
DEPLOY_TAGS.L2,
DEPLOY_TAGS.L2_PROD,
DEPLOY_TAGS.L2_TEST,
];
func.dependencies = ['CHILD_CHAIN_MANAGER', 'TRUSTED_FORWARDER_V2'];
9 changes: 8 additions & 1 deletion packages/deploy/deploy/100_claim/100_multi_claim.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import {DeployFunction} from 'hardhat-deploy/types';
import {HardhatRuntimeEnvironment} from 'hardhat/types';
import {DEPLOY_TAGS} from '../../hardhat.config';

const func: DeployFunction = async function (
hre: HardhatRuntimeEnvironment
Expand All @@ -26,5 +27,11 @@ const func: DeployFunction = async function (
};

export default func;
func.tags = ['SignedMultiGiveaway', 'SignedMultiGiveaway_deploy', 'L2'];
func.tags = [
'SignedMultiGiveaway',
'SignedMultiGiveaway_deploy',
DEPLOY_TAGS.L2,
DEPLOY_TAGS.L2_PROD,
DEPLOY_TAGS.L2_TEST,
];
func.dependencies = ['TRUSTED_FORWARDER_V2'];
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import {DeployFunction} from 'hardhat-deploy/types';
import {HardhatRuntimeEnvironment} from 'hardhat/types';
import {DEPLOY_TAGS} from '../../hardhat.config';

const func: DeployFunction = async function (
hre: HardhatRuntimeEnvironment
Expand Down Expand Up @@ -29,5 +30,11 @@ const func: DeployFunction = async function (
};

export default func;
func.tags = ['SignedMultiGiveaway', 'SignedMultiGiveaway_role_setup', 'L2'];
func.tags = [
'SignedMultiGiveaway',
'SignedMultiGiveaway_role_setup',
DEPLOY_TAGS.L2,
DEPLOY_TAGS.L2_PROD,
DEPLOY_TAGS.L2_TEST,
];
func.dependencies = ['SignedMultiGiveaway_deploy'];
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import {DeployFunction} from 'hardhat-deploy/types';
import {HardhatRuntimeEnvironment} from 'hardhat/types';
import {DEPLOY_TAGS} from '../../hardhat.config';

const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
const {deployments, getNamedAccounts} = hre;
Expand Down Expand Up @@ -41,5 +42,11 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
};

export default func;
func.tags = ['RaffleCareBears', 'RaffleCareBears_deploy'];
func.tags = [
'RaffleCareBears',
'RaffleCareBears_deploy',
DEPLOY_TAGS.L2,
DEPLOY_TAGS.L2_PROD,
DEPLOY_TAGS.L2_TEST,
];
func.dependencies = ['TRUSTED_FORWARDER_V2'];
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import {DeployFunction} from 'hardhat-deploy/types';
import {HardhatRuntimeEnvironment} from 'hardhat/types';
import {DEPLOY_TAGS} from '../../hardhat.config';

const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
const {deployments} = hre;
Expand Down Expand Up @@ -32,6 +33,9 @@ func.tags = [
'RaffleCareBears',
'RaffleCareBears_setup',
'RaffleCareBears_setup_minter',
DEPLOY_TAGS.L2,
DEPLOY_TAGS.L2_PROD,
DEPLOY_TAGS.L2_TEST,
];
// func.dependencies = ['PolygonSand_deploy', 'RaffleCareBears_deploy'];
func.dependencies = ['RaffleCareBears_deploy'];
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import {HardhatRuntimeEnvironment} from 'hardhat/types';
import {DeployFunction} from 'hardhat-deploy/types';
import {HardhatRuntimeEnvironment} from 'hardhat/types';
import {DEPLOY_TAGS} from '../../hardhat.config';

const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
const {deployments} = hre;
Expand Down Expand Up @@ -35,5 +36,8 @@ func.tags = [
'RaffleCareBears',
'RaffleCareBears_setup',
'RaffleCareBears_setup_wave',
DEPLOY_TAGS.L2,
DEPLOY_TAGS.L2_PROD,
DEPLOY_TAGS.L2_TEST,
];
func.dependencies = ['RaffleCareBears_deploy'];
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import {DeployFunction} from 'hardhat-deploy/types';
import {HardhatRuntimeEnvironment} from 'hardhat/types';
import {DEPLOY_TAGS} from '../../hardhat.config';

const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
const {deployments, getNamedAccounts} = hre;
Expand All @@ -25,5 +26,8 @@ func.tags = [
'RaffleCareBears',
'RaffleCareBears_setup',
'RaffleCareBears_setup_signer',
DEPLOY_TAGS.L2,
DEPLOY_TAGS.L2_PROD,
DEPLOY_TAGS.L2_TEST,
];
func.dependencies = ['RaffleCareBears_deploy'];
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import {DeployFunction} from 'hardhat-deploy/types';
import {HardhatRuntimeEnvironment} from 'hardhat/types';
import {DEPLOY_TAGS} from '../../hardhat.config';

const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
const {deployments, getNamedAccounts} = hre;
Expand All @@ -21,5 +22,11 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
};

export default func;
func.tags = ['RaffleCareBears', 'RaffleCareBears_change_admin'];
func.tags = [
'RaffleCareBears',
'RaffleCareBears_change_admin',
DEPLOY_TAGS.L2,
DEPLOY_TAGS.L2_PROD,
DEPLOY_TAGS.L2_TEST,
];
func.dependencies = ['RaffleCareBears_deploy'];
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import {DeployFunction} from 'hardhat-deploy/types';
import {HardhatRuntimeEnvironment} from 'hardhat/types';
import {DEPLOY_TAGS} from '../../hardhat.config';

const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
const {deployments, getNamedAccounts} = hre;
Expand Down Expand Up @@ -42,5 +43,11 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
};

export default func;
func.tags = ['RafflePlayboyPartyPeople', 'RafflePlayboyPartyPeople_deploy'];
func.tags = [
'RafflePlayboyPartyPeople',
'RafflePlayboyPartyPeople_deploy',
DEPLOY_TAGS.L2,
DEPLOY_TAGS.L2_PROD,
DEPLOY_TAGS.L2_TEST,
];
func.dependencies = ['TRUSTED_FORWARDER_V2'];
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import {DeployFunction} from 'hardhat-deploy/types';
import {HardhatRuntimeEnvironment} from 'hardhat/types';
import {DEPLOY_TAGS} from '../../hardhat.config';

const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
const {deployments} = hre;
Expand Down Expand Up @@ -33,6 +34,9 @@ func.tags = [
'RafflePlayboyPartyPeople',
'RafflePlayboyPartyPeople_setup',
'RafflePlayboyPartyPeople_setup_minter',
DEPLOY_TAGS.L2,
DEPLOY_TAGS.L2_PROD,
DEPLOY_TAGS.L2_TEST,
];
// func.dependencies = ['PolygonSand_deploy', 'RafflePlayboyPartyPeople_deploy'];
func.dependencies = ['RafflePlayboyPartyPeople_deploy'];
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import {HardhatRuntimeEnvironment} from 'hardhat/types';
import {DeployFunction} from 'hardhat-deploy/types';
import {HardhatRuntimeEnvironment} from 'hardhat/types';
import {DEPLOY_TAGS} from '../../hardhat.config';

const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
const {deployments} = hre;
Expand Down Expand Up @@ -38,5 +39,8 @@ func.tags = [
'RafflePlayboyPartyPeople',
'RafflePlayboyPartyPeople_setup',
'RafflePlayboyPartyPeople_setup_wave',
DEPLOY_TAGS.L2,
DEPLOY_TAGS.L2_PROD,
DEPLOY_TAGS.L2_TEST,
];
func.dependencies = ['RafflePlayboyPartyPeople_deploy'];
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import {DeployFunction} from 'hardhat-deploy/types';
import {HardhatRuntimeEnvironment} from 'hardhat/types';
import {DEPLOY_TAGS} from '../../hardhat.config';

const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
const {deployments, getNamedAccounts} = hre;
Expand All @@ -25,5 +26,8 @@ func.tags = [
'RafflePlayboyPartyPeople',
'RafflePlayboyPartyPeople_setup',
'RafflePlayboyPartyPeople_setup_signer',
DEPLOY_TAGS.L2,
DEPLOY_TAGS.L2_PROD,
DEPLOY_TAGS.L2_TEST,
];
func.dependencies = ['RafflePlayboyPartyPeople_deploy'];
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import {HardhatRuntimeEnvironment} from 'hardhat/types';
import {DeployFunction} from 'hardhat-deploy/types';
import {HardhatRuntimeEnvironment} from 'hardhat/types';
import {DEPLOY_TAGS} from '../../hardhat.config';

const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
const {deployments, getNamedAccounts} = hre;
Expand All @@ -24,5 +25,8 @@ export default func;
func.tags = [
'RafflePlayboyPartyPeople',
'RafflePlayboyPartyPeople_change_admin',
DEPLOY_TAGS.L2,
DEPLOY_TAGS.L2_PROD,
DEPLOY_TAGS.L2_TEST,
];
func.dependencies = ['RafflePlayboyPartyPeople_deploy'];
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import {DeployFunction} from 'hardhat-deploy/types';
import {HardhatRuntimeEnvironment} from 'hardhat/types';
import {DEPLOY_TAGS} from '../../hardhat.config';

const func: DeployFunction = async function (
hre: HardhatRuntimeEnvironment
Expand All @@ -18,4 +19,10 @@ const func: DeployFunction = async function (
});
};
export default func;
func.tags = ['RoyaltySplitter', 'RoyaltySplitter_deploy', 'L2'];
func.tags = [
'RoyaltySplitter',
'RoyaltySplitter_deploy',
DEPLOY_TAGS.L2,
DEPLOY_TAGS.L2_PROD,
DEPLOY_TAGS.L2_TEST,
];
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import {ZeroAddress} from 'ethers';
import {DeployFunction} from 'hardhat-deploy/types';
import {HardhatRuntimeEnvironment} from 'hardhat/types';
import {ZeroAddress} from 'ethers';
import {DEPLOY_TAGS} from '../../hardhat.config';

export const ROYALTY_SPLIT = 5000;

Expand Down Expand Up @@ -45,5 +46,11 @@ const func: DeployFunction = async function (
});
};
export default func;
func.tags = ['RoyaltyManager', 'RoyaltyManager_deploy', 'L2'];
func.tags = [
'RoyaltyManager',
'RoyaltyManager_deploy',
DEPLOY_TAGS.L2,
DEPLOY_TAGS.L2_PROD,
DEPLOY_TAGS.L2_TEST,
];
func.dependencies = ['RoyaltySplitter_deploy'];
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import {DeployFunction} from 'hardhat-deploy/types';
import {HardhatRuntimeEnvironment} from 'hardhat/types';
import {DEPLOY_TAGS} from '../../hardhat.config';

const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
const {deployments, getNamedAccounts} = hre;
Expand Down Expand Up @@ -51,5 +52,11 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
};

export default func;
func.tags = ['Rabbids', 'Rabbids_deploy'];
func.tags = [
'Rabbids',
'Rabbids_deploy',
DEPLOY_TAGS.L2,
DEPLOY_TAGS.L2_PROD,
DEPLOY_TAGS.L2_TEST,
];
func.dependencies = ['TRUSTED_FORWARDER_V2'];
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import {DeployFunction} from 'hardhat-deploy/types';
import {HardhatRuntimeEnvironment} from 'hardhat/types';
import {DEPLOY_TAGS} from '../../hardhat.config';

const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
const {deployments} = hre;
Expand Down Expand Up @@ -29,6 +30,13 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
};

export default func;
func.tags = ['Rabbids', 'Rabbids_setup', 'Rabbids_setup_minter'];
func.tags = [
'Rabbids',
'Rabbids_setup',
'Rabbids_setup_minter',
DEPLOY_TAGS.L2,
DEPLOY_TAGS.L2_PROD,
DEPLOY_TAGS.L2_TEST,
];
// func.dependencies = ['PolygonSand_deploy', 'Rabbids_deploy'];
func.dependencies = ['Rabbids_deploy'];
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import {HardhatRuntimeEnvironment} from 'hardhat/types';
import {DeployFunction} from 'hardhat-deploy/types';
import {HardhatRuntimeEnvironment} from 'hardhat/types';
import {DEPLOY_TAGS} from '../../hardhat.config';

const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
const {deployments} = hre;
Expand All @@ -25,5 +26,12 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
};

export default func;
func.tags = ['Rabbids', 'Rabbids_setup', 'Rabbids_setup_wave'];
func.tags = [
'Rabbids',
'Rabbids_setup',
'Rabbids_setup_wave',
DEPLOY_TAGS.L2,
DEPLOY_TAGS.L2_PROD,
DEPLOY_TAGS.L2_TEST,
];
func.dependencies = ['Rabbids_deploy'];
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import {DeployFunction} from 'hardhat-deploy/types';
import {HardhatRuntimeEnvironment} from 'hardhat/types';
import {DEPLOY_TAGS} from '../../hardhat.config';

const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
const {deployments, getNamedAccounts} = hre;
Expand All @@ -21,5 +22,12 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
};

export default func;
func.tags = ['Rabbids', 'Rabbids_setup', 'Rabbids_setup_signer'];
func.tags = [
'Rabbids',
'Rabbids_setup',
'Rabbids_setup_signer',
DEPLOY_TAGS.L2,
DEPLOY_TAGS.L2_PROD,
DEPLOY_TAGS.L2_TEST,
];
func.dependencies = ['Rabbids_deploy'];
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import {DeployFunction} from 'hardhat-deploy/types';
import {HardhatRuntimeEnvironment} from 'hardhat/types';
import {DEPLOY_TAGS} from '../../hardhat.config';

const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
const {deployments, getNamedAccounts} = hre;
Expand All @@ -21,5 +22,11 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
};

export default func;
func.tags = ['Rabbids', 'Rabbids_change_admin'];
func.tags = [
'Rabbids',
'Rabbids_change_admin',
DEPLOY_TAGS.L2,
DEPLOY_TAGS.L2_PROD,
DEPLOY_TAGS.L2_TEST,
];
func.dependencies = ['Rabbids_deploy'];
Loading

0 comments on commit ae59b85

Please sign in to comment.