I get the error MINTER_ROLE is not a function, but only when deploying to a public network.
await MyERC1155.MINTER_ROLE();
Works as expected deploying to ganache but for some reason when I deploy to rinkeby it fails.
Environment
Solidity: 0.6.12
Truffle: 5.1.42
Openzepplin/contracts: ^3.1.0
Ganache: 2.5.4 (works)
Rinkeby: (doesn’t work)
Code to reproduce
Writer.sol
contract MyERC1155 is ERC1155PresetMinterPauser {
constructor(string memory uri) public ERC1155PresetMinterPauser(uri){
}
}
1_initial_migration.js
const MyERC1155 = artifacts.require("MyERC1155")
const wp = await deployer.deploy(MyERC1155, "url");
await MyERC1155 .MINTER_ROLE();
This works as expected when deploying to ganache but fails with the error
TypeError: MyERC1155.MINTER_ROLE is not a function
when deploying to Rinkeby