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

Add initial cat mint script #1153

Merged
merged 4 commits into from
Sep 22, 2023
Merged
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
50 changes: 50 additions & 0 deletions packages/deploy/deploy/300_catalyst/300_catalyst_mint.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
import {DeployFunction} from 'hardhat-deploy/types';
import {HardhatRuntimeEnvironment} from 'hardhat/types';

const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
const {deployments, getNamedAccounts} = hre;
const {execute, catchUnknownSigner, log} = deployments;
const {catalystMinter} = await getNamedAccounts();

const mumbaiGivewayContractAddress =
'0xfCE84d07909489508C5B293a850AF15Fb7147bc6';
const polygonGiveawayContractAddress =
'0x214d52880b1e4E17d020908cd8EAa988FfDD4020';

const giveawayContractAddress =
hre.network.name === 'mumbai'
? mumbaiGivewayContractAddress
: polygonGiveawayContractAddress;

// TODO Specify amounts
const amounts = {
Common: 100,
Uncommon: 200,
Rare: 300,
Epic: 400,
Legendary: 500,
Mythic: 600,
};
await catchUnknownSigner(
execute(
'Catalyst',
{from: catalystMinter, log: true},
'mintBatch',
giveawayContractAddress,
[1, 2, 3, 4, 5, 6],
[
amounts.Common,
amounts.Uncommon,
amounts.Rare,
amounts.Epic,
amounts.Legendary,
amounts.Mythic,
]
)
);
log(`Minted 6 NFTs to ${giveawayContractAddress}`);
};

export default func;
func.tags = ['Catalyst_mint', 'L2'];
func.dependencies = ['Catalyst_deploy'];
Loading