This is a very newbie question about deploying contracts with imported dependencies.
I'm using Chainlink's AggregatorV3Interface
and SafeMath
from openzeppelin.
import "@chainlink/contracts/src/v0.6/interfaces/AggregatorV3Interface.sol";
import "@openzeppelin/contracts/math/SafeMath.sol";
I've noticed truffle compile
spits out the ABI's for both AggregatorV3Interface
and SafeMath
along with Contract I wrote myself. Why does Truffle do that?
When I deploy my contract, are the imported dependency contracts deployed also?
Or does my Contract reference the AggregatorV3Interface
already deployed to mainnet by Chainlink?
Likewise, does my contract just reference the SafeMath
contract already deployed by OpenZeppelin? Or does Truffle deploy that too?
I noticed that on Remix, when using SafeMath
or AggregatorV3Interface
you use import with an absolute URL to Github. So, it was a little confusing as to why Truffle compiles the imported contracts too.