BNB代币transfer方法在合约中执行报错

interface TokenInterface {
    function balanceOf(address who) public constant returns (uint256);
    function transfer(address to, uint256 value) public returns (bool);
}

contract CESHI is Pausable {

    using SafeMath for *;
    using Strings for *;

    address constant public token_contract = 0xB8c77482e45F1F44dE1745F52C74426C631bDD52;
    TokenInterface constant private tokenInterface = TokenInterface(token_contract);

    function withdraw(uint256 amount) public returns(bool) {
        tokenInterface.transfer(msg.sender, amount);
        return true;
    }
}

麻烦问一下,向合约转入BNB代币后,用这个withdraw方法转不出来了,ropsten测试网用标准的ERC20模板部署的代币就可以转出来,到了正式站就不行了,BNB的不合符ERC20标准吗?那怎样才能转出来啊?谢谢了

请先 登录 后评论

1 个回答

小溪
请先 登录 后评论
  • 1 关注
  • 0 收藏,3862 浏览
  • 提出于 2021-04-11 22:48