Skip to content

Commit

Permalink
README.md update
Browse files Browse the repository at this point in the history
  • Loading branch information
vaniiiii committed Oct 26, 2023
1 parent 27b3412 commit f7023b3
Showing 1 changed file with 24 additions and 10 deletions.
34 changes: 24 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,21 +74,35 @@ import { MarketTypes } from "./libs/types/MarketTypes.sol";

#### NPM Package

A better approach to import these libs is using the NPM package created for this. [:link:](https://www.npmjs.com/package/@zondax/filecoin-solidity).
Run on your project in order to add this package.
A better approach to import these libs is using the NPM package created for this [:link:](https://www.npmjs.com/package/@filecoin-project/filecoin-solidity). Run on your project in order to add this package.

```yarn
yarn add @zondax/filecoin-solidity
```
$ npm install @filecoin-project/filecoin-solidity
```

#### Foundry (git)

> [!WARNING]
> When installing via git, it is a common error to use the `master` branch. This is a development branch that should be avoided in favor of tagged releases. The release process involves security measures that the `master` branch does not guarantee.
> [!WARNING]
> Foundry installs the latest version initially, but subsequent `forge update` commands will use the `master` branch.
```
$ forge install filecoin-project/filecoin-solidity
```

Add `@filecoin-project/filecoin-solidity/=lib/filecoin-project/filecoin-solidity/` in `remappings.txt.`

#### Usage

In your smart contract, copy and paste these lines.

```solidity
import { MarketAPI } from "@zondax/filecoin-solidity/contracts/v0.8/MarketAPI.sol";
import { CommonTypes } from "@zondax/filecoin-solidity/contracts/v0.8/types/CommonTypes.sol";
import { MarketTypes } from "@zondax/filecoin-solidity/contracts/v0.8/types/MarketTypes.sol";
import { BigInt } from "@zondax/filecoin-solidity/contracts/v0.8/cbor/BigIntCbor.sol";
import { MarketAPI } from "@filecoin-project/filecoin-solidity/contracts/v0.8/MarketAPI.sol";
import { CommonTypes } from "@filecoin-project/filecoin-solidity/contracts/v0.8/types/CommonTypes.sol";
import { MarketTypes } from "@filecoin-project/filecoin-solidity/contracts/v0.8/types/MarketTypes.sol";
import { BigInt } from "@filecoin-project/filecoin-solidity/contracts/v0.8/cbor/BigIntCbor.sol";
```

## Complementary lectures
Expand Down Expand Up @@ -144,7 +158,7 @@ Requirements / Steps are performed on MacOS.
- Clone the repo with the `--recursive` flag

```
git clone https://github.com/MVPWorkshop/filecoin-solidity --recursive
git clone https://github.com/filecoin-project/filecoin-solidity.git --recursive
```
- Run: `cd filecoin-solidity`
Expand Down

0 comments on commit f7023b3

Please sign in to comment.