Truffle test ERC20 token transfers #6011
Unanswered
PijiDev
asked this question in
General Q&A
Replies: 1 comment 2 replies
-
Important note: |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm writing my smart contract tests in JS and using Truffle. I want to test a specific function in my contract that requires a token address and contract address as parameters:
When I just pass the mainnet USDC token address and mainnet Comet Address, the test errors out:
Error message: "exited with an error (status 0). Reason given: Address: call to non-contract."
From what I read online and SO answers from 2018-2019, I understand I need to somehow instantiate the ERC20 token contract (+ Comet contract). What is the best and fastest way?
Could anyone give me a real example?
Beta Was this translation helpful? Give feedback.
All reactions