Skip to content

Commit b761468

Browse files
committed
Release: v1.0.1
1 parent 0755d80 commit b761468

File tree

5 files changed

+125
-81
lines changed

5 files changed

+125
-81
lines changed

LICENSE-APACHE

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
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.

LICENSE-MIT

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
The MIT License (MIT)
2+
3+
Permission is hereby granted, free of charge, to any person obtaining a copy
4+
of this software and associated documentation files (the "Software"), to deal
5+
in the Software without restriction, including without limitation the rights
6+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7+
copies of the Software, and to permit persons to whom the Software is
8+
furnished to do so, subject to the following conditions:
9+
10+
The above copyright notice and this permission notice shall be included in
11+
all copies or substantial portions of the Software.
12+
13+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19+
THE SOFTWARE.

README.md

+28-73
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,15 @@
22

33
---
44

5-
Originally authored by Zondax. Learn more at [zondax.ch](https://www.zondax.ch).
6-
Protocol Labs are now the owners of this library, and will mantain it moving forward.
5+
[Protocol Labs](https://protocol.ai/) are now the owners of this library, and will mantain it moving forward.
6+
7+
Originally authored by [Zondax](https://www.zondax.ch).
78

89
---
910

1011
## Notice
1112

12-
This is software is available under Apache 2.0 License. Use of this library implies your acceptance of these terms and conditions
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.
1314

1415
Things to keep in mind, while using this library:
1516

@@ -73,29 +74,36 @@ import { MarketTypes } from "./libs/types/MarketTypes.sol";
7374

7475
#### NPM Package
7576

76-
A better approach to import these libs is using the NPM package created for this. [:link:](https://www.npmjs.com/package/@zondax/filecoin-solidity).
77-
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 .
7878

79-
```yarn
80-
yarn add @zondax/filecoin-solidity
79+
```
80+
$ npm install filecoin-solidity
8181
```
8282

83-
In your smart contract, copy and paste these lines.
83+
#### Foundry (git)
8484

85-
```solidity
86-
import { MarketAPI } from "@zondax/filecoin-solidity/contracts/v0.8/MarketAPI.sol";
87-
import { CommonTypes } from "@zondax/filecoin-solidity/contracts/v0.8/types/CommonTypes.sol";
88-
import { MarketTypes } from "@zondax/filecoin-solidity/contracts/v0.8/types/MarketTypes.sol";
89-
import { BigInt } from "@zondax/filecoin-solidity/contracts/v0.8/cbor/BigIntCbor.sol";
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.
87+
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
9093
```
9194

92-
### Supported networks
95+
Add `filecoin-solidity/=lib/filecoin-solidity/` in `remappings.txt.`
9396

94-
The following table contains information about the versions of filecoin network on which the `filecoin-solidity` library has been tested on.
97+
#### Usage
9598

96-
| FVM version | Builtin actors | Pass |
97-
| :---------------------------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------------------------------------------------: | :----------------: |
98-
| [[email protected]](https://github.com/filecoin-project/ref-fvm/releases/tag/fvm%40v3.0.0-alpha.21) | [builtin_actors@dev/20230206-pre-rc.6](https://github.com/filecoin-project/builtin-actors/releases/tag/dev%2F20230206-pre-rc.6) | :white_check_mark: |
99+
In your smart contract, copy and paste these lines.
100+
101+
```solidity
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";
106+
```
99107

100108
## Complementary lectures
101109

@@ -119,59 +127,6 @@ Find nice articles with rich and valuable content about different topics related
119127

120128
Filecoin solidity documentation: [Let's go to docs web](https://docs.filecoin.io/smart-contracts/developing-contracts/solidity-libraries/) :arrow_upper_right:
121129

122-
## Getting Started
123-
124-
Requirements / Steps are performed on MacOS.
125-
126-
### Requirements:
127-
128-
- **Foundry** [[Official Docs]](https://book.getfoundry.sh/getting-started/installation):
129-
130-
`curl -L https://foundry.paradigm.xyz | bash`
131-
132-
- **Rust** [[Official Docs]](https://doc.rust-lang.org/book/ch01-01-installation.html):
133-
134-
`curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf | sh`
135-
136-
- **Yarn**[[Official Docs]](https://classic.yarnpkg.com/lang/en/docs/install/#mac-stable):
137-
138-
`npm install --global yarn`
139-
140-
- **CMake** [[Official Docs]](https://cmake.org/download/):
141-
142-
- [MacOS] Install GUI: [v3.7.0](https://github.com/Kitware/CMake/releases/download/v3.27.0/cmake-3.27.0-macos-universal.dmg)
143-
- Add it to the Application folder
144-
- Open terminal and run:
145-
146-
` sudo "/Applications/CMake.app/Contents/bin/cmake-gui" --install`
147-
148-
### Setup process:
149-
150-
- Clone the repo with the `--recursive` flag
151-
152-
```
153-
git clone https://github.com/MVPWorkshop/filecoin-solidity --recursive
154-
```
155-
156-
- Run: `cd filecoin-solidity`
157-
- Install Solc:
158-
159-
- MacOS:
160-
`make install_solc_mac`
161-
- Linux:
162-
`make install_solc_linux`
163-
164-
- Run: `make`
165-
166-
### Workflow
167-
168-
- Compiling / testing contracts:
169-
170-
`forge <build/test>`
171-
172-
- Running all of the integration tests:
173-
174-
`make test_integration`
130+
---
175131

176-
- Running individual integration tests:
177-
- see [Makefile](./Makefile) for a complete list
132+
_**Information for `filecoin-solidity` lib developers is contained in [./lib-dev](./lib-dev)**_

lib-dev/README.md

+64
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
## Getting Started
2+
3+
Requirements / Steps are performed on MacOS.
4+
5+
### Requirements:
6+
7+
- **Foundry** [[Official Docs]](https://book.getfoundry.sh/getting-started/installation):
8+
9+
`curl -L https://foundry.paradigm.xyz | bash`
10+
11+
- **Rust** [[Official Docs]](https://doc.rust-lang.org/book/ch01-01-installation.html):
12+
13+
`curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf | sh`
14+
15+
- **Yarn**[[Official Docs]](https://classic.yarnpkg.com/lang/en/docs/install/#mac-stable):
16+
17+
`npm install --global yarn`
18+
19+
- **CMake** [[Official Docs]](https://cmake.org/download/):
20+
21+
- [MacOS] Install GUI: [v3.7.0](https://github.com/Kitware/CMake/releases/download/v3.27.0/cmake-3.27.0-macos-universal.dmg)
22+
- Add it to the Application folder
23+
- Open terminal and run:
24+
25+
` sudo "/Applications/CMake.app/Contents/bin/cmake-gui" --install`
26+
27+
### Setup process:
28+
29+
- Clone the repo with the `--recursive` flag
30+
31+
```
32+
git clone https://github.com/filecoin-project/filecoin-solidity.git --recursive
33+
```
34+
35+
- Run: `cd filecoin-solidity`
36+
- Install Solc:
37+
38+
- MacOS:
39+
`make install_solc_mac`
40+
- Linux:
41+
`make install_solc_linux`
42+
43+
- Run: `make`
44+
45+
### Workflow
46+
47+
- Compiling / testing contracts:
48+
49+
`forge <build/test>`
50+
51+
- Running all of the integration tests:
52+
53+
`make test_integration`
54+
55+
- Running individual integration tests:
56+
- see [Makefile](./Makefile) for a complete list
57+
58+
### Supported networks
59+
60+
The following table contains information about the versions of filecoin network on which the `filecoin-solidity` library has been tested on.
61+
62+
| FVM version | Builtin actors | Pass |
63+
| :---------------------------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------------------------------------------------: | :----------------: |
64+
| [[email protected]](https://github.com/filecoin-project/ref-fvm/releases/tag/fvm%40v3.0.0-alpha.21) | [builtin_actors@dev/20230206-pre-rc.6](https://github.com/filecoin-project/builtin-actors/releases/tag/dev%2F20230206-pre-rc.6) | :white_check_mark: |

package.json

+9-8
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"name": "@zondax/filecoin-solidity",
3-
"version": "0.0.0",
2+
"name": "filecoin-solidity",
3+
"version": "1.0.1",
44
"description": "Filecoin EVM Solidity APIs",
55
"main": "",
66
"directories": {
@@ -11,22 +11,23 @@
1111
},
1212
"repository": {
1313
"type": "git",
14-
"url": "git+https://github.com/Zondax/filecoin-solidity.git"
14+
"url": "git+https://github.com/filecoin-project/filecoin-solidity.git"
1515
},
1616
"keywords": [
1717
"FEVM",
1818
"EVM",
1919
"Solidity",
2020
"Filecoin"
2121
],
22-
"author": "Zondax AG <[email protected]>",
23-
"license": "Apache-2.0",
22+
"author": "[Protocol Labs, Filecoin Core Devs]",
23+
"license": "MIT OR Apache-2.0",
2424
"bugs": {
25-
"url": "https://github.com/Zondax/filecoin-solidity/issues"
25+
"url": "https://github.com/filecoin-project/filecoin-solidity/issues"
2626
},
27-
"homepage": "https://github.com/Zondax/filecoin-solidity#readme",
27+
"homepage": "https://github.com/filecoin-project/filecoin-solidity#readme",
2828
"files": [
29-
"contracts"
29+
"contracts/",
30+
"!/contracts/v0.8/tests/**/*"
3031
],
3132
"publishConfig": {
3233
"access": "public"

0 commit comments

Comments
 (0)