Open taiyangc opened 3 years ago
import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
Can you try to import again ?
@ReactTop Same result.
What is openzeppelin/contracts version in package.json?
There is no package.json in Remix (should there be?)
Under .deps/npm/@openzeppelin/contracts@4.1.0 is as imported.
Hmm ,Can you try to build your contract with truffle-framework instead of Remix ? or Please add ERC20 ,ERC721 contracts manually in remix without module install. I think remix is not working well with openzeppelin. So the editor should be VS code editor.
Yes, I am aware that other frameworks have no issues (I am using hardhat without problems). Sometimes it's much easier to debug functions in Remix, so I hope Remix could address this bug.
Maybe , then Please add them manually .
On Wed, Jun 2, 2021 at 8:58 AM Eric Chen @.***> wrote:
Yes, I am aware that other frameworks have no issues (I am using hardhat without problems). Sometimes it's much easier to debug functions in Remix, so I hope Remix could address this bug.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ethereum/remix-project/issues/1242#issuecomment-852624566, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHPAQPQ7N7R7PVI5VKNLWNTTQV63FANCNFSM452XL7GA .
Hi! I have the same error with Remix
I have in the same contract ERC20 y ERC721 contracts of OpenZeppelin, but if I comment out import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC721/ERC721.sol"; then the event emit works as expected.
Have you been able to solve the problem?
Thnks
same here
I have been getting a weird
errored: Error: data out-of-bounds (length=0, offset=32, code=BUFFER_OVERRUN, version=abi/5.1.2)
error when testing contract functions in Remix, even though it goes through without revert. After debugging and stripping most of the logic, I found a minimal example to reproduce this problem:The
test()
call would produce an errorLooking closer, I can see that both OpenZeppelin's ERC20 and ERC721 contracts provide a
Transfer
Event. To verify this assumption, I commented out//import "@openzeppelin/contracts@4.1.0/token/ERC20/ERC20.sol";
and the event emit works as expected. Because my contract uses ERC20 to instantiate an instance of a token so I need to import the definitions, but I am confused if this is a bug in Remix or by design a Solidity contract should not import two files with the same Event names? Is there any way to organize imports to get rid of this problem?