What are the general best practices around storing newly minted ERC-20 tokens?
Do you store them in the Token Contract or Treasure Account?
Using oz SDK and one of the Initialize functions w/in
Here is a code snippet from a flattened verified contract.
/**
* @title Standard ERC20 token, with minting and pause functionality.
*
*/
contract StandaloneERC20 is Initializable, ERC20Detailed, ERC20Mintable, ERC20Pausable {
function initialize(
string memory name, string memory symbol, uint8 decimals, uint256 initialSupply, address initialHolder,
address[] memory minters, address[] memory pausers
) public initializer {
ERC20Detailed.initialize(name, symbol, decimals);
// Mint the initial supply
_mint(initialHolder, initialSupply);
// Initialize the minter and pauser roles, and renounce them
ERC20Mintable.initialize(address(this));
_removeMinter(address(this));
ERC20Pausable.initialize(address(this));
_removePauser(address(this));
// Add the requested minters and pausers (this can be done after renouncing since
// these are the internal calls)
for (uint256 i = 0; i < minters.length; ++i) {
_addMinter(minters[i]);
}
for (uint256 i = 0; i < pausers.length; ++i) {
_addPauser(pausers[i]);
}
}