'deploy Openzeppelin ERC20 contract with web3JS
The openzeppelin codes of ERC20 token give error in deploying directly. Even after flattern the codes, i am unable to select contract MyToken
out of many contracts.
I think i need to change some codes here:
var input = {
language: 'Solidity',
sources: {'test.sol': {content: codes}},
settings: {
outputSelection: {
'*': {
'*': ['*']
}
}
}
}
Solution 1:[1]
This is a compiler input. Just install truffle/hardhat, and you can compile and deploy with it. They have default input options for solc that should be enough for you, they will also take care of all the imports, which is a known pain in the butt when compiling with solc directly.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Whytecrowe |