Exploring ERC777 smart contracts

Published: 5/3/2021

Repo: github.com/iammatthias/tokens/tree/main/erc777

Recently started working on an exploratory upgradeable ERC777 smart contract. OpenZeppelin has a boilerplate for this type of contract, so I started there. I was working with this in Remix, which you can't upgrade using, which meant exploring Truffle and Hardhat. In the end I settled on Hardhat. It gave me the fewest problems.

I followed along with the OpenZeppelin Upgrades: Step by Step Tutorial for Hardhat to get my enviroment set up, then modified some things to replace the default ERC20 contract with the ERC777 boilerplate. Which consited entirely of deleting the ERC20 contract and replacing it with the ERC777 contract.


None of the default tests were working, so I deleted them. And now I need to write new ones before I actually publish this on MainNet. But that's what TestNets are for, right? ...right?

Added a Mint function that seems to not be emmitting a transfer event—so EtherScan isn't updating the total. Annoying, but addressable.

future updates pending