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

added hardhat project for pixel avatars #23

Merged
merged 4 commits into from
Oct 19, 2021
Merged

added hardhat project for pixel avatars #23

merged 4 commits into from
Oct 19, 2021

Conversation

etherinsight
Copy link
Contributor

This is a working version of the hardhat solidity project for pixel avatars.

@vercel
Copy link

vercel bot commented Oct 15, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/developdao/pixel-avatars/DejHYrapoYEpConJ9hVnie2mbJL5
✅ Preview: https://pixel-avatars-git-fork-etherinsight-main-developdao.vercel.app

@etherinsight
Copy link
Contributor Author

This PR contains:

  • Solidity contract for pixel avatars

  • hardhat config to
    - run the project in rinkeby testnet and
    - verify contract on etherscan

  • readme file with instructions

@Dhaiwat10
Copy link
Member

Thanks for putting this in @etherinsight! I was wondering why is it that you chose not to import the source code for these utility contracts: ERC721Enumerable, ReentrancyGuard, Ownable.

(I'm not experienced w/ mainnet contract development so let me know if this is a common practice for mainnet/prod)

@etherinsight
Copy link
Contributor Author

@Dhaiwat10 I used a flattened code file as my reference which has all the required modules ERC721Enumerable, ReentrancyGuard, Ownable in that single solidity file.

A command like this will create a single file including all imports like ERC721, Ownable etc

npx hardhat flatten contracts/unflattened.sol >flatttened.sol

@Dhaiwat10
Copy link
Member

Gotcha. I got to read up on this later and found out that flattened contracts are required(?) if you want your contract to be 'verified' on Etherscan. Is that correct?

@Dhaiwat10
Copy link
Member

Else, this looks good to me. Let's get this merged and add tests?

//Private sale minting (reserved for DevDao owners)
function mintWithDevDaoToken(uint256 DevDaoTokenId)
public
payable
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this payable tho?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reposting my comment as etherinsight again 😅

good catch. Not sure why this was kept payable on my reference contract. I'll remove this.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Haha cool

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants