智能合约 Etherscan 验证

问题描述

我收到此错误错误!无法生成合约字节码和 ABI 我在 Remix 中部署了 de contract,这是合约:

pragma solidity ^0.5.0;

// ----------------------------------------------------------------------------
// BunkerBits Token 
// https://bunkerbits.com
//
//Official ERC20 Version by Mr.Underground
// ----------------------------------------------------------------------------
contract ERC20Interface {
    function totalSupply() public view returns (uint);
    function balanceOf(address tokeNowner) public view returns (uint balance);
    function allowance(address tokeNowner,address spender) public view returns (uint remaining);
    function transfer(address to,uint tokens) public returns (bool success);
    function approve(address spender,uint tokens) public returns (bool success);
    function transferFrom(address from,address to,uint tokens) public returns (bool success);

    event Transfer(address indexed from,address indexed to,uint tokens);
    event Approval(address indexed tokeNowner,address indexed spender,uint tokens);
}

// ----------------------------------------------------------------------------
// Safe Math Library
// ----------------------------------------------------------------------------
contract Bunker {
    function safeAdd(uint a,uint b) public pure returns (uint c) {
        c = a + b;
        require(c >= a);
    }
    function safeSub(uint a,uint b) public pure returns (uint c) {
        require(b <= a); c = a - b; } function safeMul(uint a,uint b) public pure returns (uint c) { c = a * b; require(a == 0 || c / a == b); } function safeDiv(uint a,uint b) public pure returns (uint c) { require(b > 0);
        c = a / b;
    }
}


contract BunkerBits is ERC20Interface,Bunker {
    string public name;
    string public symbol;
    uint8 public decimals; // 18 decimals is the strongly suggested default

    uint256 public _totalSupply;

    mapping(address => uint) balances;
    mapping(address => mapping(address => uint)) allowed;

    /**
     * Constrctor function
     *
     * Initializes contract with initial supply tokens to the creator of the contract
     */
    constructor() public {
        name = "BunkerBits";
        symbol = "BUBI";
        decimals = 18;
        _totalSupply = 10000000000000000000000000;

        balances[msg.sender] = _totalSupply;
        emit Transfer(address(0),msg.sender,_totalSupply);
    }

    function totalSupply() public view returns (uint) {
        return _totalSupply  - balances[address(0)];
    }

    function balanceOf(address tokeNowner) public view returns (uint balance) {
        return balances[tokeNowner];
    }

    function allowance(address tokeNowner,address spender) public view returns (uint remaining) {
        return allowed[tokeNowner][spender];
    }

    function approve(address spender,uint tokens) public returns (bool success) {
        allowed[msg.sender][spender] = tokens;
        emit Approval(msg.sender,spender,tokens);
        return true;
    }

    function transfer(address to,uint tokens) public returns (bool success) {
        balances[msg.sender] = safeSub(balances[msg.sender],tokens);
        balances[to] = safeAdd(balances[to],tokens);
        emit Transfer(msg.sender,to,tokens);
        return true;
    }

    function transferFrom(address from,uint tokens) public returns (bool success) {
        balances[from] = safeSub(balances[from],tokens);
        allowed[from][msg.sender] = safeSub(allowed[from][msg.sender],tokens);
        emit Transfer(from,tokens);
        return true;
    }
}

合约创建: https://ropsten.etherscan.io/tx/0x1f7569f7f7806e414c4ae4bd101b38412c9e984776be354c8272b820ce2adbca

在源代码中发现以下 ContractName(s):Bunker、BunkerBits、ERC20Interface 但是我们无法找到匹配的字节码 (err_code_2)

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)