You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
2
+
3
+
http://www.apache.org/licenses/LICENSE-2.0
4
+
5
+
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
[Protocol Labs](https://protocol.ai/) are now the owners of this library, and will mantain it moving forward.
10
6
11
-
_Please visit our website at [zondax.ch](https://www.zondax.ch)_
7
+
Originally authored by [Zondax](https://www.zondax.ch).
12
8
13
9
---
14
10
15
11
## Notice
16
12
17
-
This is software is available under Apache 2.0 License. Use of this library implies your acceptance of these terms and conditions
18
-
This source code at this commit hash (https://github.com/Zondax/filecoin-solidity/commit/d6f20ea11b25e66b9a4fb94d0bb0d913edeb5873) was security-reviewed by Kudelski security (Not fully audited)
13
+
This software is dual-licensed under the [MIT License](./LICENSE-MIT) and the [Apache Software License v2](./LICENSE-APACHE) by way of the [Permissive License Stack](https://protocol.ai/blog/announcing-the-permissive-license-stack/). Use of this library implies your acceptance of these terms and conditions.
19
14
20
15
Things to keep in mind, while using this library:
21
-
- There are implicit invariants these contracts expect to hold.
22
-
- You should exhaustively read each contract you plan to use, top to bottom.
23
-
-**You can easily “shoot yourself in the foot” if you’re not careful with how you use the library.**
16
+
17
+
- There are implicit invariants these contracts expect to hold.
18
+
- You should exhaustively read each contract you plan to use, top to bottom.
19
+
-**You can easily “shoot yourself in the foot” if you’re not careful with how you use the library.**
24
20
25
21
---
26
22
27
23
## Disclaimer :warning:
28
24
29
-
The libraries have been developed under the following set of assumptions. Take a look at them [here :link:](https://docs.zondax.ch/fevm/filecoin-solidity/introduction/assumptions)
25
+
The libraries have been developed under the following set of assumptions.
30
26
27
+
Take a look at them [here](https://docs.zondax.ch/fevm/filecoin-solidity/introduction/assumptions).
31
28
32
29
---
33
30
@@ -73,26 +70,39 @@ You will need to copy these files to a folder inside your project. Let's name it
73
70
import { MarketAPI } from "./libs/MarketAPI.sol";
74
71
import { CommonTypes } from "./libs/types/CommonTypes.sol";
75
72
import { MarketTypes } from "./libs/types/MarketTypes.sol";
76
-
77
73
```
78
74
79
75
#### NPM Package
80
76
81
-
A better approach to import these libs is using the NPM package created for this. [:link:](https://www.npmjs.com/package/@zondax/filecoin-solidity).
82
-
Run on your project in order to add this package.
77
+
Better approach to import these libs is using the [NPM package](https://www.npmjs.com/package/filecoin-solidity) created for this .
78
+
79
+
```
80
+
$ npm install filecoin-solidity
81
+
```
82
+
83
+
#### Foundry (git)
84
+
85
+
> [!WARNING]
86
+
> 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.
83
87
84
-
```yarn
85
-
yarn add @zondax/filecoin-solidity
88
+
> [!WARNING]
89
+
> Foundry installs the latest version initially, but subsequent `forge update` commands will use the `master` branch.
90
+
91
+
```
92
+
$ forge install filecoin-solidity
86
93
```
87
94
95
+
Add `filecoin-solidity/=lib/filecoin-solidity/` in `remappings.txt.`
96
+
97
+
#### Usage
98
+
88
99
In your smart contract, copy and paste these lines.
89
100
90
101
```solidity
91
-
import { MarketAPI } from "@zondax/filecoin-solidity/contracts/v0.8/MarketAPI.sol";
92
-
import { CommonTypes } from "@zondax/filecoin-solidity/contracts/v0.8/types/CommonTypes.sol";
93
-
import { MarketTypes } from "@zondax/filecoin-solidity/contracts/v0.8/types/MarketTypes.sol";
94
-
import { BigInt } from "@zondax/filecoin-solidity/contracts/v0.8/cbor/BigIntCbor.sol";
95
-
102
+
import { MarketAPI } from "filecoin-solidity/contracts/v0.8/MarketAPI.sol";
103
+
import { CommonTypes } from "filecoin-solidity/contracts/v0.8/types/CommonTypes.sol";
104
+
import { MarketTypes } from "filecoin-solidity/contracts/v0.8/types/MarketTypes.sol";
105
+
import { BigInt } from "filecoin-solidity/contracts/v0.8/cbor/BigIntCbor.sol";
96
106
```
97
107
98
108
## Complementary lectures
@@ -113,13 +123,10 @@ If you’re starting totally new, we got you! Here’s a 101 conceptual read on
113
123
114
124
Find nice articles with rich and valuable content about different topics related to Filecoin network.
115
125
116
-
## Looking for a JS library to interact with Filecoin? :wrench::hammer:
126
+
## Looking for the complete documentation? :books::books:
117
127
118
-
We have been working hard to create a complete library that covers every aspect you may need in order to interact with
119
-
the Filecoin blockchain. [Let's go to library](https://www.npmjs.com/package/@zondax/izari-filecoin):arrow_upper_right:
128
+
Filecoin solidity documentation: [Let's go to docs web](https://docs.filecoin.io/smart-contracts/developing-contracts/solidity-libraries/):arrow_upper_right:
120
129
121
-
## Looking for the complete documentation? :books::books:
130
+
---
122
131
123
-
We have built this beautiful website for you!
124
-
[Let's go to docs web](https://docs.zondax.ch/fevm/filecoin-solidity):arrow_upper_right:
125
-
132
+
_**Information for `filecoin-solidity` lib developers is contained in [./lib-dev](./lib-dev)**_
0 commit comments