Skip to content

Commit

Permalink
hardhat config and tsconfig.json to use import instead of require
Browse files Browse the repository at this point in the history
  • Loading branch information
imysh578 committed Mar 22, 2022
1 parent 368c9f5 commit 2281754
Show file tree
Hide file tree
Showing 11 changed files with 9,746 additions and 55,132 deletions.
2 changes: 2 additions & 0 deletions _hardhat/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ node_modules
coverage
coverage.json
typechain
yarn.lock
package-lock.json

#Hardhat files
cache
Expand Down
2 changes: 1 addition & 1 deletion _hardhat/contracts/MusitNFT.sol
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ contract MusitNFT is ERC721URIStorage, Ownable {
mapping (address => mapping(uint256 => uint256)) ownedNFT; // 주소가 소유한 NFT : 주소 => (tokenId => tokenURI)

constructor () ERC721("Musit NFT","MUSIT") {
mintPrice = 1 ether;
mintPrice = 0.01 ether;
maxSupply = 20;
maxMintsPerWallet = 2;
maxMintsPerTx = 1;
Expand Down
10 changes: 5 additions & 5 deletions _hardhat/hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,13 @@ const getApiKey = (provider: string): string | undefined => {
else return "";
};

const getURL = (provider: string): string => {
const getURL = (provider: string, network: string): string => {
const apiKey = getApiKey(provider);
if (provider && apiKey) {
if (provider == "alchemy") {
return `https://eth-${provider}.alchemyapi.io/v2/${apiKey}`;
return `https://eth-${network}.alchemyapi.io/v2/${apiKey}`;
} else if (provider == "infura") {
return `https://${provider}.infura.io/v3/${apiKey}`;
return `https://${network}.infura.io/v3/${apiKey}`;
} else return "";
} else return "";
};
Expand All @@ -58,11 +58,11 @@ const config: HardhatUserConfig = {
defaultNetwork: "ropsten",
networks: {
ropsten: {
url: getURL("alchemy"),
url: getURL("alchemy", "ropsten"),
accounts: getPrivateKey(),
},
rinkeby: {
url: getURL("alchemy"),
url: getURL("alchemy", "rinkeby"),
accounts: getPrivateKey(),
},
},
Expand Down
Loading

0 comments on commit 2281754

Please sign in to comment.