Details
Deployed smart contract over remix onto the binance smart chain and am now trying to verify the code. I used truffle flattener and tried uploading that file and get the following errors:
myc:414:1: DeclarationError: Identifier already declared.
interface IERC20 {
^ (Relevant source part starts here and spans across multiple lines).
myc:41:1: The previous declaration is here:
interface IERC20 {
^ (Relevant source part starts here and spans across multiple lines).
myc:502:1: DeclarationError: Identifier already declared.
library SafeMath {
^ (Relevant source part starts here and spans across multiple lines).
myc:264:1: The previous declaration is here:
library SafeMath {
^ (Relevant source part starts here and spans across multiple lines).
I then thought the next step would be to delete the duplicates, but then I was getting an error after that saying the bytecode is not similar was expecting …
Environment
Truffle v5.1.65, Windows 10, Remix, Binance Smart Chain
Code to reproduce
working with the following contract:
required Openzeppelin import links:
import “https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v2.5.1/contracts/math/Math.sol”;
import “https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v2.5.1/contracts/token/ERC20/IERC20.sol”;