I deployed a contract through remix because I thought it was the easiest route. However, now I am trying to verify it through optimism etherscan and it wont verify. I tried flattening on Remix and pasting that code in but no luck. Anything I try isnt working. Now im trying to sue Hardhat after the fact for verification but I get this error ...
Error in plugin @nomicfoundation/hardhat-verify: The address provided as argument contains a contract, but its bytecode doesn't match any of your local contracts.
// SPDX-License-Identifier: MIT
// @@ @@
// fredfred
// fredfredfred
// fredfredfredfr
// fredfredfredfre
// fredfredfredfred re
// fredfredfredf red
// fredfredfredfredfredfredfredfredfredfredfre fred
// fredfredfredfredfredfredfredfredfredfredfredfre fredf
// fredfredfredfredfredfredfredfredfredfredfredfredfre fredf
// fredfredfredfredfredfredfredfredfredfredfredfredfredfredfredfredfredfr
// fredfredfredfredfredfredfredfredfredfredfredfredfredfredfredfredfre
// fredfredfredfredfredfredfredfredfredfredfredfred fredfredfr
// frfredfredfredfredfredfredfredfredfredfredfred
// fredfredfredfred fredfredfredfredfr
// fredd fredfr fredfredfredfredfr
// fred fredfr fredfr fredfredfr
// fred fred fredfr fredfred
// fredfredf fredfr fred
// fre fred fredfr fred
// @@@@fred@@@@ f@@@@f @@@@
//Contract will be deployed to 0x3Af90f103d855c4597b8D06689e62ADBBfC07a27
//We then transfer 50% of supply to 0x66a2B8BD2d7881cb9D95eDe41E90b57a7aa69E0a which will disperse
//All the tokens to Velo lockers, snapshot taking earlier this week.
//The remaining 50% will stay with the deployer. The deployer will use these tokens for marketing/liquidity/weekly bribes on Velodrome
//There is no team allocation
//This token has a transfer tax ( to/from Velo contracts excluded). The tax is locked at 0.75% coming and going.
//50% of the tax will go to buying Velo to vote for Bike pool.
//The remaining 50% will be used to improve the livelihood of cyclists around the world, hence the name "Bike"
//We will use these funds to donate to cycling charities, sponsor cycling teams, buying bikes for those in need etc.
pragma solidity ^0.8.9;
import "@openzeppelin/contracts@4.9.2/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts@4.9.2/token/ERC20/extensions/ERC20Burnable.sol";
import "@openzeppelin/contracts@4.9.2/token/ERC20/extensions/ERC20Snapshot.sol";
import "@openzeppelin/contracts@4.9.2/access/Ownable.sol";
import "@openzeppelin/contracts@4.9.2/token/ERC20/extensions/draft-ERC20Permit.sol";
import "@openzeppelin/contracts@4.9.2/token/ERC20/extensions/ERC20Votes.sol";
contract BIKE is ERC20, ERC20Burnable, ERC20Snapshot, Ownable, ERC20Permit, ERC20Votes {
mapping(address => bool) public isTaxExempt;
constructor() ERC20("Bike", "Bike") ERC20Permit("Bike") {
_mint(msg.sender, 10000000 * 10 ** decimals());
percentage = 75;
//Adding all Velo and the Owner/ Wallet used for airdrop dispersal to tax exemption
isTaxExempt[0x66a2B8BD2d7881cb9D95eDe41E90b57a7aa69E0a] = true;
isTaxExempt[0x3Af90f103d855c4597b8D06689e62ADBBfC07a27] = true;
isTaxExempt[0x9D4736EC60715e71aFe72973f7885DCBC21EA99b] = true;
isTaxExempt[0xF4c67CdEAaB8360370F41514d06e32CcD8aA1d7B] = true;
isTaxExempt[0x06824df38D1D77eADEB6baFCB03904E27429Ab74] = true;
isTaxExempt[0x8391fE399640E7228A059f8Fa104b8a7B4835071] = true;
isTaxExempt[0x987E7922367B23C4A5fa34C8C5B1385174A095d6] = true;
isTaxExempt[0xcDd9585005095ac7447d1fDbC990C5CFB805cff0] = true;
isTaxExempt[0x6dc9E1C04eE59ed3531d73a72256C0da46D10982] = true;
isTaxExempt[0xF1046053aa5682b4F9a81b5481394DA16BE5FF5a] = true;
isTaxExempt[0xa062aE8A9c5e11aaA026fc2670B0D65cCc8B2858] = true;
isTaxExempt[0x585Af0b397AC42dbeF7f18395426BF878634f18D] = true;
isTaxExempt[0xda03Dc399aF3F1545748243aAFbC5050A63B17eC] = true;
isTaxExempt[0x5aeE5F0E6C2055EbD776DB25F48f6c9A68ABcdaE] = true;
isTaxExempt[0x45fF00822E8235b86Cb605ac8295c14628cE78a4] = true;
isTaxExempt[0x9560e827aF36c94D2Ac33a39bCE1Fe78631088Db] = true;
isTaxExempt[0x41C914ee0c7E1A5edCD0295623e6dC557B5aBf3C] = true;
isTaxExempt[0xFAf8FD17D9840595845582fCB047DF13f006787d] = true;
isTaxExempt[0x756E7C245C69d351FfFBfb88bA234aa395AdA8ec] = true;
isTaxExempt[0x07F544813E9Fb63D57a92f28FbD3FF0f7136F5cE] = true;
isTaxExempt[0x253CA289Cd921ba4a18C053C00a80c9660D508f8] = true;
}
event TaxTransferred(address indexed from, uint256 value);
uint256 private percentage;
function setTaxExemptStatus(address user, bool status) public onlyOwner {
isTaxExempt[user] = status;
}
function transferFrom(address from, address to, uint256 amount) public virtual override returns (bool) {
uint256 total;
if(isTaxExempt[from] || isTaxExempt[to]){
total = amount;
} else {
uint256 percentageFee = (amount * percentage) / 10000;
total = amount - percentageFee;
_transfer(from, 0x66a2B8BD2d7881cb9D95eDe41E90b57a7aa69E0a, percentageFee);
emit TaxTransferred(from, percentageFee);
}
_approve(from, _msgSender(), allowance(from,_msgSender()) - amount);
_transfer(from, to, total);
return true;
}
function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
uint256 total;
if(isTaxExempt[_msgSender()] || isTaxExempt[recipient]){
total = amount;
} else {
uint256 percentageFee = (amount * percentage) / 10000;
total = amount - percentageFee;
_transfer(_msgSender(), 0x66a2B8BD2d7881cb9D95eDe41E90b57a7aa69E0a, percentageFee);
emit TaxTransferred(_msgSender(), percentageFee);
}
_transfer(_msgSender(), recipient, total);
return true;
}
function snapshot() public onlyOwner {
_snapshot();
}
function mint(address to, uint256 amount) public onlyOwner {
_mint(to, amount);
}
function _beforeTokenTransfer(address from, address to, uint256 amount)
internal
override(ERC20, ERC20Snapshot)
{
super._beforeTokenTransfer(from, to, amount);
}
function _afterTokenTransfer(address from, address to, uint256 amount)
internal
override(ERC20, ERC20Votes)
{
super._afterTokenTransfer(from, to, amount);
}
function _mint(address to, uint256 amount)
internal
override(ERC20, ERC20Votes)
{
super._mint(to, amount);
}
function _burn(address account, uint256 amount)
internal
override(ERC20, ERC20Votes)
{
super._burn(account, amount);
}
}