Provide a way to obtain dependency artifacts
Author: frangioCreated Aug 31, 2018Updated Sep 27, 2023
Labelsbughelp wantedneeds investigatedpriority5 🌀
If someone wants to deploy a contract provided in OpenZeppelin they currently have to somehow put it in a place where Truffle will compile it. A common hack is to create an Imports.sol file in the project with contents import 'openzeppelin-solidity/contracts/...';. This is not ideal. OpenZeppelin should provide the artifacts in the npm package and Truffle should be able to create a contract abstraction from those artifacts.
This is an ugly API just to get a picture of the potential usage:
const ERC721Token = artifacts.dependency('openzeppelin-solidity').require('ERC721Token');
await ERC721Token.new(name, symbol);Source: ConsenSys-archive/truffle