question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

parse address from signer when passed as contract call parameter

See original GitHub issue

Current

let user: Signer

it('should get balance and owner', async () => {
  expect(await token.balanceOf(await user.getAddress())).to.eq(0)
  expect(await token.owner()).to.eq(await user.getAddress())
})

Desired

let user: Signer

it('should get balance and owner', async () => {
  expect(await token.balanceOf(user)).to.eq(0)
  expect(await token.owner()).to.eq(user)
})

Related to https://github.com/EthWorks/Waffle/issues/358

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:10 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
zemsecommented, Sep 7, 2020

can the token.balanceOf be changed to taking a promise ?

Actually, this is already implemented! Promise inputs are resolved.

1reaction
ricmoocommented, Oct 8, 2020

I think this has been answered and I’ve added the Addressable to my TODO backlog for v6, so I’m going to close this now. If there are still issues, please feel free to re-open.

Thanks! 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Sending an argument with an ethers contract object
I need to pass an argument userTeamChosen with a appendUserBet() function which I both set the values for through html forms but get...
Read more >
encodeABI to get call data with encoded parameters ... - GitHub
is there anyway i can encode executable contract and pass it into the data parameter like this myContract.methods.myMethod(123).
Read more >
Ethers pass method name with parameters instead of hexdata
I am using ethers to interact with contracts on Ethereum. This is how my method looks like:
Read more >
Contracts — ethers.js 4.0.0 documentation
A Contract is an abstraction of an executable program on the Ethereum Blockchain. A Contract has code (called byte code) as well as...
Read more >
Ethers.js Cheatsheet - ChainShot
@param {Contract} deliveryService - An ethers.js Contract pointed at a ... send ether directly to the example contract address from the signer await...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found