@thinkanddev/deploy-eip-1820-rsk
v1.0.1
Published
Helper to deploy the EIP 1820 Registry smart contract to a RSK network using Ethers.js
Downloads
3
Readme
Deploy EIP 1820
Ethereum EIP 1820 is a standard for pseudo-introspection of smart contracts on Ethereum.
This library ensures that the EIP 1820 registry smart contract exists on any given chain. Particularly useful for test environments.
Uses ethers.js v5.
If you're using ethers.js v4 then try the 0.2 version.
Setup
Install @thinkanddev/deploy-eip-1820-rsk
via yarn:
$ yarn add @thinkanddev/deploy-eip-1820-rsk
or npm:
$ npm i @thinkanddev/deploy-eip-1820-rsk
Usage
Deploys EIP 1820 Registry contract on the network you are using
const { deploy1820 } = require('@thinkanddev/deploy-eip-1820-rsk')
async function deploy() {
const wallet = ethers.Wallet.fromMnemonic("...your mnemonic...")
// The wallet must have at least 0.08 Ether
const registryContract = await deploy1820(wallet)
// Now we have an Ethers Contract instance for the ERC1820 Registry contract
let implementer = await registryContract.getInterfaceImplementer('0x1234...', '0xINTERFACE_HASH')
}