Skip to content

Commit

Permalink
workaround for missing PolygonSand deployment in deploy package
Browse files Browse the repository at this point in the history
  • Loading branch information
abarbatei committed Oct 6, 2023
1 parent 94eea36 commit 85c41b7
Show file tree
Hide file tree
Showing 8 changed files with 111 additions and 40 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,25 @@ import {HardhatRuntimeEnvironment} from 'hardhat/types';

const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
const {deployments} = hre;
const {get, read, execute, catchUnknownSigner} = deployments;
const {read, execute, catchUnknownSigner} = deployments;

const sandContract = await get('PolygonSand');
let sandContractAddress;
if (hre.network.name === 'polygon') {
sandContractAddress = '0xBbba073C31bF03b8ACf7c28EF0738DeCF3695683';
} else {
// hre.network.name === 'mumbai'
sandContractAddress = '0x592daadC9eA7F56A81De1FD27A723Bd407709c46';
}
// const sandContract = await get('PolygonSand');
const minter = await read('RaffleCareBears', 'allowedToExecuteMint');
if (minter !== sandContract.address) {
if (minter !== sandContractAddress) {
const owner = await read('RaffleCareBears', 'owner');
await catchUnknownSigner(
execute(
'RaffleCareBears',
{from: owner, log: true},
'setAllowedExecuteMint',
sandContract.address
sandContractAddress
)
);
}
Expand All @@ -26,4 +33,5 @@ func.tags = [
'RaffleCareBears_setup',
'RaffleCareBears_setup_minter',
];
func.dependencies = ['PolygonSand_deploy', 'RaffleCareBears_deploy'];
// func.dependencies = ['PolygonSand_deploy', 'RaffleCareBears_deploy'];
func.dependencies = ['RaffleCareBears_deploy'];
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,26 @@ import {HardhatRuntimeEnvironment} from 'hardhat/types';

const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
const {deployments} = hre;
const {get, read, execute, catchUnknownSigner} = deployments;
const {read, execute, catchUnknownSigner} = deployments;

const sandContract = await get('PolygonSand');
let sandContractAddress;
if (hre.network.name === 'polygon') {
sandContractAddress = '0xBbba073C31bF03b8ACf7c28EF0738DeCF3695683';
} else {
// hre.network.name === 'mumbai'
sandContractAddress = '0x592daadC9eA7F56A81De1FD27A723Bd407709c46';
}

// const sandContract = await get('PolygonSand');
const minter = await read('RafflePlayboyPartyPeople', 'allowedToExecuteMint');
if (minter !== sandContract.address) {
if (minter !== sandContractAddress) {
const owner = await read('RafflePlayboyPartyPeople', 'owner');
await catchUnknownSigner(
execute(
'RafflePlayboyPartyPeople',
{from: owner, log: true},
'setAllowedExecuteMint',
sandContract.address
sandContractAddress
)
);
}
Expand All @@ -26,4 +34,5 @@ func.tags = [
'RafflePlayboyPartyPeople_setup',
'RafflePlayboyPartyPeople_setup_minter',
];
func.dependencies = ['PolygonSand_deploy', 'RafflePlayboyPartyPeople_deploy'];
// func.dependencies = ['PolygonSand_deploy', 'RafflePlayboyPartyPeople_deploy'];
func.dependencies = ['RafflePlayboyPartyPeople_deploy'];
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,32 @@ import {HardhatRuntimeEnvironment} from 'hardhat/types';

const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
const {deployments} = hre;
const {get, read, execute, catchUnknownSigner} = deployments;
const {read, execute, catchUnknownSigner} = deployments;

const sandContract = await get('PolygonSand');
let sandContractAddress;
if (hre.network.name === 'polygon') {
sandContractAddress = '0xBbba073C31bF03b8ACf7c28EF0738DeCF3695683';
} else {
// hre.network.name === 'mumbai'
sandContractAddress = '0x592daadC9eA7F56A81De1FD27A723Bd407709c46';
}

// const sandContract = await get('PolygonSand');
const minter = await read('Rabbids', 'allowedToExecuteMint');
if (minter !== sandContract.address) {
if (minter !== sandContractAddress) {
const owner = await read('Rabbids', 'owner');
await catchUnknownSigner(
execute(
'Rabbids',
{from: owner, log: true},
'setAllowedExecuteMint',
sandContract.address
sandContractAddress
)
);
}
};

export default func;
func.tags = ['Rabbids', 'Rabbids_setup', 'Rabbids_setup_minter'];
func.dependencies = ['PolygonSand_deploy', 'Rabbids_deploy'];
// func.dependencies = ['PolygonSand_deploy', 'Rabbids_deploy'];
func.dependencies = ['Rabbids_deploy'];
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,32 @@ import {HardhatRuntimeEnvironment} from 'hardhat/types';

const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
const {deployments} = hre;
const {get, read, execute, catchUnknownSigner} = deployments;
const {read, execute, catchUnknownSigner} = deployments;

const sandContract = await get('PolygonSand');
let sandContractAddress;
if (hre.network.name === 'polygon') {
sandContractAddress = '0xBbba073C31bF03b8ACf7c28EF0738DeCF3695683';
} else {
// hre.network.name === 'mumbai'
sandContractAddress = '0x592daadC9eA7F56A81De1FD27A723Bd407709c46';
}

// const sandContract = await get('PolygonSand');
const minter = await read('MadBalls', 'allowedToExecuteMint');
if (minter !== sandContract.address) {
if (minter !== sandContractAddress) {
const owner = await read('MadBalls', 'owner');
await catchUnknownSigner(
execute(
'MadBalls',
{from: owner, log: true},
'setAllowedExecuteMint',
sandContract.address
sandContractAddress
)
);
}
};

export default func;
func.tags = ['MadBalls', 'MadBalls_setup', 'MadBalls_setup_minter'];
func.dependencies = ['PolygonSand_deploy', 'MadBalls_deploy'];
// func.dependencies = ['PolygonSand_deploy', 'MadBalls_deploy'];
func.dependencies = ['MadBalls_deploy'];
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,32 @@ import {HardhatRuntimeEnvironment} from 'hardhat/types';

const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
const {deployments} = hre;
const {get, read, execute, catchUnknownSigner} = deployments;
const {read, execute, catchUnknownSigner} = deployments;

const sandContract = await get('PolygonSand');
let sandContractAddress;
if (hre.network.name === 'polygon') {
sandContractAddress = '0xBbba073C31bF03b8ACf7c28EF0738DeCF3695683';
} else {
// hre.network.name === 'mumbai'
sandContractAddress = '0x592daadC9eA7F56A81De1FD27A723Bd407709c46';
}

// const sandContract = await get('PolygonSand');
const minter = await read('DanceFight', 'allowedToExecuteMint');
if (minter !== sandContract.address) {
if (minter !== sandContractAddress) {
const owner = await read('DanceFight', 'owner');
await catchUnknownSigner(
execute(
'DanceFight',
{from: owner, log: true},
'setAllowedExecuteMint',
sandContract.address
sandContractAddress
)
);
}
};

export default func;
func.tags = ['DanceFight', 'DanceFight_setup', 'DanceFight_setup_minter'];
func.dependencies = ['PolygonSand_deploy', 'DanceFight_deploy'];
// func.dependencies = ['PolygonSand_deploy', 'DanceFight_deploy'];
func.dependencies = ['DanceFight_deploy'];
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,32 @@ import {HardhatRuntimeEnvironment} from 'hardhat/types';

const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
const {deployments} = hre;
const {get, read, execute, catchUnknownSigner} = deployments;
const {read, execute, catchUnknownSigner} = deployments;

const sandContract = await get('PolygonSand');
let sandContractAddress;
if (hre.network.name === 'polygon') {
sandContractAddress = '0xBbba073C31bF03b8ACf7c28EF0738DeCF3695683';
} else {
// hre.network.name === 'mumbai'
sandContractAddress = '0x592daadC9eA7F56A81De1FD27A723Bd407709c46';
}

// const sandContract = await get('PolygonSand');
const minter = await read('HellsKitchen', 'allowedToExecuteMint');
if (minter !== sandContract.address) {
if (minter !== sandContractAddress) {
const owner = await read('HellsKitchen', 'owner');
await catchUnknownSigner(
execute(
'HellsKitchen',
{from: owner, log: true},
'setAllowedExecuteMint',
sandContract.address
sandContractAddress
)
);
}
};

export default func;
func.tags = ['HellsKitchen', 'HellsKitchen_setup', 'HellsKitchen_setup_minter'];
func.dependencies = ['PolygonSand_deploy', 'HellsKitchen_deploy'];
// func.dependencies = ['PolygonSand_deploy', 'HellsKitchen_deploy'];
func.dependencies = ['HellsKitchen_deploy'];
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,26 @@ import {HardhatRuntimeEnvironment} from 'hardhat/types';

const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
const {deployments} = hre;
const {get, read, execute, catchUnknownSigner} = deployments;
const {read, execute, catchUnknownSigner} = deployments;

const sandContract = await get('PolygonSand');
let sandContractAddress;
if (hre.network.name === 'polygon') {
sandContractAddress = '0xBbba073C31bF03b8ACf7c28EF0738DeCF3695683';
} else {
// hre.network.name === 'mumbai'
sandContractAddress = '0x592daadC9eA7F56A81De1FD27A723Bd407709c46';
}

// const sandContract = await get('PolygonSand');
const minter = await read('FistOfTheNorthStar', 'allowedToExecuteMint');
if (minter !== sandContract.address) {
if (minter !== sandContractAddress) {
const owner = await read('FistOfTheNorthStar', 'owner');
await catchUnknownSigner(
execute(
'FistOfTheNorthStar',
{from: owner, log: true},
'setAllowedExecuteMint',
sandContract.address
sandContractAddress
)
);
}
Expand All @@ -26,4 +34,5 @@ func.tags = [
'FistOfTheNorthStar_setup',
'FistOfTheNorthStar_setup_minter',
];
func.dependencies = ['PolygonSand_deploy', 'FistOfTheNorthStar_deploy'];
// func.dependencies = ['PolygonSand_deploy', 'FistOfTheNorthStar_deploy'];
func.dependencies = ['FistOfTheNorthStar_deploy'];
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,32 @@ import {HardhatRuntimeEnvironment} from 'hardhat/types';

const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
const {deployments} = hre;
const {get, read, execute, catchUnknownSigner} = deployments;
const {read, execute, catchUnknownSigner} = deployments;

const sandContract = await get('PolygonSand');
let sandContractAddress;
if (hre.network.name === 'polygon') {
sandContractAddress = '0xBbba073C31bF03b8ACf7c28EF0738DeCF3695683';
} else {
// hre.network.name === 'mumbai'
sandContractAddress = '0x592daadC9eA7F56A81De1FD27A723Bd407709c46';
}

// const sandContract = await get('PolygonSand');
const minter = await read('ParisHilton', 'allowedToExecuteMint');
if (minter !== sandContract.address) {
if (minter !== sandContractAddress) {
const owner = await read('ParisHilton', 'owner');
await catchUnknownSigner(
execute(
'ParisHilton',
{from: owner, log: true},
'setAllowedExecuteMint',
sandContract.address
sandContractAddress
)
);
}
};

export default func;
func.tags = ['ParisHilton', 'ParisHilton_setup', 'ParisHilton_setup_minter'];
func.dependencies = ['PolygonSand_deploy', 'ParisHilton_deploy'];
// func.dependencies = ['PolygonSand_deploy', 'ParisHilton_deploy'];
func.dependencies = ['ParisHilton_deploy'];

0 comments on commit 85c41b7

Please sign in to comment.