You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I'm currently using the Truffle framework to deploy an ERC20 token contract. For that purpose I use npm install @openzeppelin/contracts and include the needed node_modules into my main code: import "../node_modules/openzeppelin-solidity/contracts/token/ERC20/ERC20.sol";. However, I can't compile it unless I change in the Address.sol the Solidity version back to 0.6.0 since that is the version all other dependencies use in the OpenZeppelin contracts currently (e.g. Context.sol, IERC20.sol, SafeMath.sol).
An example code that can't be compiled in Truffle using just the npm install @openzeppelin/contracts command would be the following:
pragma solidity ^0.6.0;
import "../node_modules/openzeppelin-solidity/contracts/token/ERC20/ERC20.sol";
abstract contract TestERC20Contract is ERC20 {
uint256 public initialSupply = 1000;
constructor() public {
_mint(msg.sender, initialSupply);
}
}
The text was updated successfully, but these errors were encountered:
Hi, I'm currently using the Truffle framework to deploy an ERC20 token contract. For that purpose I use
npm install @openzeppelin/contracts
and include the needed node_modules into my main code:import "../node_modules/openzeppelin-solidity/contracts/token/ERC20/ERC20.sol";
. However, I can't compile it unless I change in theAddress.sol
the Solidity version back to 0.6.0 since that is the version all other dependencies use in the OpenZeppelin contracts currently (e.g.Context.sol
,IERC20.sol
,SafeMath.sol
).An example code that can't be compiled in Truffle using just the
npm install @openzeppelin/contracts
command would be the following:The text was updated successfully, but these errors were encountered: