For example,

import { FlashLoanReceiverBase } from "./FlashLoanReceiverBase.sol";

FlashLoanReceiverBase.sol is here:

Seems not much different from:

import ./FlashLoanReceiverBase.sol

at a glance.

1 Answer 1


There si a small difference btweetn them.

import { FlashLoanReceiverBase } from "./FlashLoanReceiverBase.sol"

This imports just the FlashLoanReceiverBase contract from FlashLoanReceiverBase.sol file.

import ./FlashLoanReceiverBase.sol

This imports all contracts from the file. In most cases, it wouldn't matter which one you use, because the compiler will figure out what contracts are being used and ignore the others, the compiled code will be the same.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.