sablier-labs / docs

Documentation and guides for Sablier
https://docs.sablier.com
GNU General Public License v3.0
15 stars 7 forks source link

Remappings issue in local environment #106

Closed codenamejason closed 8 months ago

codenamejason commented 8 months ago

Docs link for reference: https://docs.sablier.com/contracts/v2/guides/local-environment

In your docs it states to run this:

$ echo "@sablier/v2-core=lib/v2-core/src" >> remappings.txt
$ echo "@sablier/v2-periphery=lib/v2-periphery/src" >> remappings.txt

This is not correct based on the imports of the contracts in the example.

import { ISablierV2LockupLinear } from "@sablier/v2-core/src/interfaces/ISablierV2LockupLinear.sol";
import { Broker, LockupLinear } from "@sablier/v2-core/src/types/DataTypes.sol";
import { ud60x18 } from "@sablier/v2-core/src/types/Math.sol";
import { IERC20 } from "@sablier/v2-core/src/types/Tokens.sol";

I had to remove the /src from the remapping.txt file to build successfully.

@sablier/v2-core=lib/v2-core/
@sablier/v2-periphery=lib/v2-periphery/
PaulRBerg commented 8 months ago

Great catch, thanks for taking the time to report this issue!

We have actually switched to using Node.js packages in the meantime. I created a PR to fix this: #108.