Will using import statement in my BEP20 Token code affect me in the future?

457 views Asked by At

I recently created a BEP20 token on remix etherium. But instead of writing the whole code, I used import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/ERC20.sol" and added some 5-6 lines of my own.

  1. If by any means, the GitHub repo gets deleted or shifted, will it affect my token? Will it stop working or could there be a loss of coins? If yes, how can I prevent this?

  2. Also, while approving my contract on bscscan.com, should I put the contract code with the import statement? Because then it would be only 10 lines. Or should I paste the code from openZeppelin.git + extra added lines?

1

There are 1 answers

1
Petr Hejda On BEST ANSWER

If by any means, the GitHub repo gets deleted or shifted, will it affect my token?

After you compile & deploy your contract, change of the remote source will not affect your contract bytecode.

Also, while approving my contract on bscscan.com, should I put the contract code with the import statement?

Yes, you can use the "single file" verification (assuming your 10 lines are in just one file) that uses the import. It will download the current remote file and include it for the verification.

Note that there's a very small probability of the remote file being changed between your compilation and verification on BscScan. In that case the verification would fail, because the overall source code (and bytecode generated from it) sent to the verification would not be the same as the deployed one. You can lower this (already small) risk by pointing not to a branch name (master in your case) but to a specific commit (assuming the repo maintainers do not change their GIT history).