Unable to verify BEP20 smart contract on BSCscan

I created a Smart contract, made it work on REMIX IDE, then published it on BSC
The problem is, now when I’m trying to verify it on BSCscan, it has an error because I Imported the libraries. But should I import them as other files with .sol extension ?
Here is the error it finds :

Error! Unable to generate Contract ByteCode and ABI **(General Exception, unable to get compiled [bytecode])**
BEP20.sol:5:1: ParserError: Source "access/Ownable.sol" not found: File import callback not supported
import '../../access/Ownable.sol'
^--------------------------------^
BEP20.sol:6:1: ParserError: Source "GSN/Context.sol" not found: File import callback not supported
import '../../GSN/Context.sol'
^-----------------------------^
BEP20.sol:8:1: ParserError: Source "math/SafeMath.sol" not found: File import callback not supported
import '../../math/SafeMath.sol'
^-------------------------------^
BEP20.sol:9:1: ParserError: Source "utils/Address.sol" not found: File import callback not supported
import '../../utils/Address.sol'
^-------------------------------^
IBEP20.sol:5:1: ParserError: Source "access/Ownable.sol" not found: File import callback not supported
import '../../access/Ownable.sol'
^--------------------------------^
IBEP20.sol:6:1: ParserError: Source "GSN/Context.sol" not found: File import callback not supported
import '../../GSN/Context.sol'
^-----------------------------^
IBEP20.sol:8:1: ParserError: Source "math/SafeMath.sol" not found: File import callback not supported
import '../../math/SafeMath.sol'
^-------------------------------^
IBEP20.sol:9:1: ParserError: Source "utils/Address.sol" not found: File import callback not supported
import '../../utils/Address.sol'
^-------------------------------^
Narutoken.sol:4:1: ParserError: Source "@pancakeswap/pancake-swap-lib/contracts/token/BEP20/BEP20.sol" not found: File import callback not supported
import "@pancakeswap/pancake-swap-lib/contracts/token/BEP20/BEP20.sol"
^---------------------------------------------------------------------^
Narutoken.sol:5:1: ParserError: Source "@pancakeswap/pancake-swap-lib/contracts/token/BEP20/SafeBEP20.sol" not found: File import callback not supported
import "@pancakeswap/pancake-swap-lib/contracts/token/BEP20/SafeBEP20.sol"
^-------------------------------------------------------------------------^
Narutoken.sol:6:1: ParserError: Source "@pancakeswap/pancake-swap-lib/contracts/access/Ownable.sol" not found: File import callback not supported
import "@pancakeswap/pancake-swap-lib/contracts/access/Ownable.sol"
^------------------------------------------------------------------^
Narutoken.sol:7:1: ParserError: Source "@pancakeswap/pancake-swap-lib/contracts/math/SafeMath.sol" not found: File import callback not supported
import "@pancakeswap/pancake-swap-lib/contracts/math/SafeMath.sol"
^-----------------------------------------------------------------^
Narutoken.sol:8:1: ParserError: Source "@pancakeswap/pancake-swap-lib/contracts/utils/Address.sol" not found: File import callback not supported
import "@pancakeswap/pancake-swap-lib/contracts/utils/Address.sol"
^-----------------------------------------------------------------^
Ownable.sol:5:1: ParserError: Source "GSN/Context.sol" not found: File import callback not supported
import '../GSN/Context.sol'
^--------------------------^
SafeBEP20.sol:6:1: ParserError: Source "math/SafeMath.sol" not found: File import callback not supported
import '../../math/SafeMath.sol'
^-------------------------------^
SafeBEP20.sol:7:1: ParserError: Source "utils/Address.sol" not found: File import callback not supported
import '../../utils/Address.sol'
^-------------------------------^
1 Like

Hey, welcome!

Sorry, I am not familiar with the BSC-Chain, maybe you should ask for help in their forum: Home | Binance Chain Forum

And they have a documentation about how to verify contracts, maybe you can have a look at it: Truffle Verify - Binance Chain Docs

If you want help, then you would need to share your contract address, solidity code, constructor parameters and whether optimization was used.

1 Like