Simple script to deploy an ERC1820 registry in a testing environment that uses ethers.js
npm install erc1820-ethers-registry
const singletons = require('erc1820-ethers-registry')
const accounts = await ethers.getSigners()
await singletons.ERC1820Registry(accounts[0])