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

refactor: Includes ERC1155 mock to be deployed #223

Merged
merged 1 commit into from
May 19, 2024
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
11 changes: 11 additions & 0 deletions scripts/deployMock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ async function main() {
/// @dev The returned contract instance that will be deployed via the deploy function in utils.
let MockERC20: Contract;
let MockERC721: Contract;
let MockERC1155: Contract;

/// @dev will throw an error if any of the accounts was not set up correctly.
try {
Expand All @@ -27,6 +28,7 @@ async function main() {
// We are deploying both contracts to test the user flux with the entire functionality.
MockERC20 = await deploy("MockERC20", signers[0]);
MockERC721 = await deploy("MockERC721", signers[0]);
MockERC1155 = await deploy("MockERC1155", signers[0]);

// @dev Log Contract address and the Tx hash which can be searched on Etherscan (or any other block explorer).
console.log(
Expand All @@ -43,13 +45,22 @@ async function main() {
MockERC721.deployTransaction.hash,
);

console.log(
"\nContract %s \nDeployed to %s \nAt Tx %s\n",
"MockERC1155",
MockERC1155.address,
MockERC1155.deployTransaction.hash,
);

/// @dev Store the contract addresses in the .env file.
await storeEnv(MockERC20.address, "ERC20_ADDRESS", true);
await storeEnv(MockERC721.address, "ERC721_ADDRESS", true);
await storeEnv(MockERC1155.address, "ERC1155_ADDRESS", true);

/// @dev Awaits for the transaction to be mined.
await MockERC20.deployed();
await MockERC721.deployed();
await MockERC1155.deployed();
}

main().catch((error) => {
Expand Down
Loading