Somehow I can not manage that the functions:
setMintingFeeAddress
setMintingFeePercent
are called during the contract initialization.
NNNToken.sol (implements EnhancedMinterPauser) is initialized
and initializes other contracts including EnhancedMinterPauser, calling __EnhancedMinterPauser_init_unchained method. This calls
setMintingFeeAddress
setMintingFeePercent, but the parameters are not set.
Short gist:
ManagedEnhancedERC20.sol
pragma solidity 0.6.2;
import "@openzeppelin/contracts-ethereum-package/contracts/Initializable.sol";
import "@openzeppelin/contracts-ethereum-package/contracts/access/AccessControl.sol";
import "./EnhancedERC20.sol";
import "@openzeppelin/contracts-ethereum-package/contracts/utils/Pausable.sol";
/**
* @dev ERC20 token with pausable token transfers.
*
This file has been truncated. show original
NNNToken.sol
pragma solidity 0.6.2;
import "@openzeppelin/contracts-ethereum-package/contracts/Initializable.sol";
import "@openzeppelin/contracts-ethereum-package/contracts/math/SafeMath.sol";
import "./ManagedEnhancedERC20.sol";
contract NNNToken is Initializable, ManagedEnhancedERC20 {
using SafeMath for uint256;
function initialize(string memory name, string memory symbol)
This file has been truncated. show original
full Code:
1 Like
fixed it.
was calling the super method initialize
from ERC20 instead of the NNNToken.sol __initialize
function while deploying.
1 Like
Hi @intoverq ,
Welcome to the community forum
Iām glad you were able to resolve.