8

Entities like Open Zeppelin offer "well tested and audited" (I'm paraphrasing) open source Solidity code for common patterns such as ownership, ERC20 tokens, etc.

Are there any such entities (or just normal developers) who are, in the same vein as Open Zeppelin, open sourcing rigorous tests for code that is supposed to comply with the popular ERC standards?

Specifically, I've written some ERC721 compliant code, and I'm wondering if there are really good truffle test modules for this code. Would probably be more rigorous than what I'd write, and would definitely save me a lot of time and effort.

5
+25

I'm currently developing my own implementation of an ERC721 compliant token.

I wrote a number of tests for it, which I have added to my Github so that you may use if you wish.

The test file was written in NodeJS, using Ganache-cli, Web3 and Mocha for tests. Contracts were compiled using Solc.

You will need to create and compile a valid and invalid "token receiver" contract for testing the "safeTransferFrom" methods.

Note, this is just a file I wrote for my own personal use, so it's not extremely polished or anything. But if you aren't an absolute beginner you shouldn't have any trouble.

1

We at 0xcert are one of the groups that develop well tested open-source projects. We usually post a bug bounty for core projects like ERC-721 implementation. Here https://github.com/0xcert/ethereum-erc721 is the complete reference implementation of the ERC-721 non-fungible token standard for the Ethereum blockchain with tests. This reference also went through bug bounty.

For code compliance use ERC-721 Validator here https://erc721validator.org.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.