I'm trying to write a simple aggregator for aave, (I couldn't find a good example for one which uses aave V2)
So I decided to cheat, and piece meal things together off of Polycats Github
I noticied they're importing contracts directly from github like so:
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/release-v3.1.0/contracts/access/Ownable.sol"; import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/release-v3.1.0/contracts/token/ERC20/SafeERC20.sol"; import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/release-v3.1.0/contracts/utils/Pausable.sol"; import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/release-v3.1.0/contracts/utils/ReentrancyGuard.sol";
When I try to do something similar in my project I get an error:
Source "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/release-v3.1.0/contracts/token/ERC20/SafeERC20.sol" not found: File import callback not supported
I'm aware I can Import directly from the NPM packages. However, I'm curious on how to do this.
- How can I import contracts in a similar fashion?
- How does this work, e.g (Does the import only occur during migration)?