【发布时间】:2021-08-11 05:05:34
【问题描述】:
我的solidity 0.8.4 代币合约正在流行:
TypeError: Type is not callable
_isExcludedFromFee[(owner)] = true;
^^^^^^^^
发件人:
constructor () {
_rOwned[_msgSender()] = _rTotal;
IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x05fF2B0DB69458A0750badebc4f9e13aDd608C7F);
// Create a uniswap pair for this new token
uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory())
.createPair(address(this), _uniswapV2Router.WETH());
// set the rest of the contract variables
uniswapV2Router = _uniswapV2Router;
_isExcludedFromFee[owner()] = true;
_isExcludedFromFee[address(this)] = true;
emit Transfer(address(0), _msgSender(), _tTotal);
initialize();
pause();
}
我认为是“所有者”导致了错误,并将在下面附上 Ownable 和令牌合约。有一个所有者函数通常包含在 SafeMoon 的 Ownable 中,它返回 _owner 但这只会破坏一切,因为我新声明了地址公共所有者。
【问题讨论】:
标签: typeerror solidity callable remix owner