Can i ask a question about tokens? Just deployed from remix IDE to sepolia testnet, and faced problem when tried to 'verify and publish' i always get such an error:

Error! Unable to generate Contract ByteCode and ABI (General Exception, unable to get compiled [bytecode])

ParserError: Source ".deps/npm/@openzeppelin/contracts/token/ERC20/ERC20.sol" not found: File import callback not supported
--> myc:5:1:
|
5 | import ".deps/npm/@openzeppelin/contracts/token/ERC20/ERC20.sol"
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

ParserError: Source ".deps/npm/@openzeppelin/contracts/access/Ownable.sol" not found: File import callback not supported
--> myc:6:1:
|
6 | import ".deps/npm/@openzeppelin/contracts/access/Ownable.sol"
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^


Tried a lot of solutions but no effect

May 1, 2023, 2:17 PM
https://dontasktoask.com/
May 1, 2023, 2:17 PM
haha love it
May 1, 2023, 2:18 PM
anyway i asked after asked to ask
May 1, 2023, 2:18 PM
flatten out the contract on remix first
right click your contract
May 1, 2023, 2:18 PM
i see, and theres new file
flattened.sol
May 1, 2023, 2:19 PM
yeah paste that as the source code in etherscan
May 1, 2023, 2:19 PM
omg if that's gonna work rn i'll eat my usb
woah i dont need to eat my usb there's new error:

Error! Unable to generate Contract ByteCode and ABI
but actually i pasted ABI that i got from hashex org
so im kinda stuck
help, please
May 1, 2023, 2:34 PM
Show your imports
May 1, 2023, 2:35 PM
solved that problem btw
imports was same as everywhere from @openzeppelin - ownable.sol and erc20.sol
actually i just copied them from some code, checked, compiled successfully
May 1, 2023, 2:38 PM

© 2024 Draquery.com All rights reserved.