Skip to content
This repository has been archived by the owner on Nov 15, 2021. It is now read-only.

please god, please ethers support #133

Open
SilentCicero opened this issue Aug 3, 2020 · 2 comments
Open

please god, please ethers support #133

SilentCicero opened this issue Aug 3, 2020 · 2 comments

Comments

@SilentCicero
Copy link

Hi all,

Really happy to see some Truffle suite alternatives.

But, I have one comment:
ethers.js, ethers.js, ethers.js, ethers.js

Please support ethers.js contracts / preferences.

Best,
Ethereum Friend.

@frangio
Copy link
Contributor

frangio commented Aug 3, 2020

Thank you for the feedback @SilentCicero. We will definitely keep this in mind for planning.

@mds1
Copy link
Contributor

mds1 commented Aug 20, 2020

I'd also love to see ethers.js support.

This will spill over into @openzeppelin/test-helpers, since expectEvent doesn't support ethers-style receipts, though I assume you're already aware of this.

Another thing to consider when supporting this is to make sure it supports ganache forks properly. I tried using ethers in testing manually, but as soon as contract development progressed to the stage of needing to fork the mainnet, transactions started failing.

For example, these lines worked until I started forking the mainnet:

const TestToken = contract.fromArtifact('TestToken');
const tokenFactory = new ethers.ContractFactory(TestToken.abi, TestToken.bytecode, wallet);
usdc = await tokenFactory.deploy('USD Coin', 'USDC');
await usdc.deployTransaction.wait();

When forking, the above fails with Error: Missing required chain parameter: networkId

You can confirm the issue is related to ethers.js usage because if you refactor to the below, the transaction succeeds again:

const TestToken = contract.fromArtifact('TestToken');
const usdc = await TestToken.new("USD Coin", "USDC");

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

No branches or pull requests

3 participants