Skip to content

Commit

Permalink
Merge pull request #223 from blackbeard002/deploy1155
Browse files Browse the repository at this point in the history
refactor: Includes ERC1155 mock to be deployed
  • Loading branch information
0xneves authored May 19, 2024
2 parents 645a818 + 9ffdc10 commit 7c7ca2c
Showing 1 changed file with 11 additions and 0 deletions.
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

0 comments on commit 7c7ca2c

Please sign in to comment.