首页 > 解决方案 > BSCSCAN 上的“错误!无法生成合约字节码和 ABI”

问题描述

我需要帮助在 bscscan 上验证我的 BEP-20 令牌。我不确定问题是什么,但我认为是 ABI 编码。我不确定我是否在代码中使用了正确的类来制作 ABI 代码。我会为你们链接一切,希望能解决它。

这是一些代码:

constructor() public BEP20("GreenArrowToken", "$GAT", 9) {
        uint256 _BNBRewardsFee = 11;
        uint256 _liquidityFee = 4;

        BNBRewardsFee = _BNBRewardsFee;
        liquidityFee = _liquidityFee;
        totalFees = _BNBRewardsFee.add(_liquidityFee);


        dividendTracker = new GreenArrowTokenDividendTracker();

        liquidityWallet = owner();
        //testnet
        // IPancakeswapV2Router02 _pancakeswapV2Router = IPancakeswapV2Router02(0x9Ac64Cc6e4415144C455BD8E4837Fea55603e5c3);
        //mainnet
        IPancakeswapV2Router02 _pancakeswapV2Router = IPancakeswapV2Router02(0x10ED43C718714eb63d5aA57B78B54704E256024E);
         // Create a pancakeswap pair for this new token
        address _pancakeswapV2Pair = IPancakeswapV2Factory(_pancakeswapV2Router.factory())
            .createPair(address(this), _pancakeswapV2Router.WETH());

        pancakeswapV2Router = _pancakeswapV2Router;
        pancakeswapV2Pair = _pancakeswapV2Pair;

        _setAutomatedMarketMakerPair(_pancakeswapV2Pair, true);

        // exclude from receiving dividends
        dividendTracker.excludeFromDividends(address(dividendTracker));
        dividendTracker.excludeFromDividends(address(this));
        dividendTracker.excludeFromDividends(owner());
        dividendTracker.excludeFromDividends(address(_pancakeswapV2Router));

        // exclude from paying fees or having max transaction amount
        excludeFromFees(liquidityWallet, true);
        excludeFromFees(address(this), true);

        // enable owner and fixed-sale wallet to send tokens before presales are over
        canTransferBeforeTradingIsEnabled[owner()] = true;

        /*
            _mint is an internal function in BEP20.sol that is only called here,
            and CANNOT be called ever again
        */
        _mint(owner(), 1000000000 * (10**9));
    }

整个代码太长了,所以我放到了pastebin:https ://pastebin.com/muh7w3Zv

这是代币的合约地址:0xfe19fdF4A11f5728AcB5D44640bb9fF85d68deFe

我认为它希望我添加 IterableMapping 库,所以我也部署了该合约并尝试添加它但没有运气。如果我不添加它会给我一个错误:0xfe19fdF4A11f5728AcB5D44640bb9fF85d68deFe

我使用https://abi.hashex.org/来获取 ABI 代码。

请帮忙,哈哈。

标签: performancecryptographybinancecryptoapicryptocurrency

解决方案


推荐阅读