Skip to content

Commit

Permalink
Release: v1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
wertikalk committed Dec 8, 2023
1 parent 4016878 commit e64da9c
Show file tree
Hide file tree
Showing 6 changed files with 164 additions and 270 deletions.
201 changes: 0 additions & 201 deletions LICENSE

This file was deleted.

5 changes: 5 additions & 0 deletions LICENSE-APACHE
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
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

http://www.apache.org/licenses/LICENSE-2.0

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.
19 changes: 19 additions & 0 deletions LICENSE-MIT
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
The MIT License (MIT)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
65 changes: 36 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,30 @@
# Filecoin Solidity

[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
[![GithubActions](https://github.com/Zondax/filecoin-solidity/actions/workflows/main.yaml/badge.svg)](https://github.com/Zondax/filecoin-solidity/blob/master/.github/workflows/main.yaml)

---

![zondax_light](docs/assets/zondax_light.png#gh-light-mode-only)
![zondax_dark](docs/assets/zondax_dark.png#gh-dark-mode-only)
[Protocol Labs](https://protocol.ai/) are now the owners of this library, and will mantain it moving forward.

_Please visit our website at [zondax.ch](https://www.zondax.ch)_
Originally authored by [Zondax](https://www.zondax.ch).

---

## Notice

This is software is available under Apache 2.0 License. Use of this library implies your acceptance of these terms and conditions
This source code at this commit hash (https://github.com/Zondax/filecoin-solidity/commit/d6f20ea11b25e66b9a4fb94d0bb0d913edeb5873) was security-reviewed by Kudelski security (Not fully audited)
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.

Things to keep in mind, while using this library:
- There are implicit invariants these contracts expect to hold.
- You should exhaustively read each contract you plan to use, top to bottom.
- **You can easily “shoot yourself in the foot” if you’re not careful with how you use the library.**

- There are implicit invariants these contracts expect to hold.
- You should exhaustively read each contract you plan to use, top to bottom.
- **You can easily “shoot yourself in the foot” if you’re not careful with how you use the library.**

---

## Disclaimer :warning:

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)
The libraries have been developed under the following set of assumptions.

Take a look at them [here](https://docs.zondax.ch/fevm/filecoin-solidity/introduction/assumptions).

---

Expand Down Expand Up @@ -73,26 +70,39 @@ You will need to copy these files to a folder inside your project. Let's name it
import { MarketAPI } from "./libs/MarketAPI.sol";
import { CommonTypes } from "./libs/types/CommonTypes.sol";
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.
Better approach to import these libs is using the [NPM package](https://www.npmjs.com/package/filecoin-solidity) created for this .

```
$ npm install 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.
```yarn
yarn add @zondax/filecoin-solidity
> [!WARNING]
> Foundry installs the latest version initially, but subsequent `forge update` commands will use the `master` branch.
```
$ forge install filecoin-solidity
```

Add `filecoin-solidity/=lib/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-solidity/contracts/v0.8/MarketAPI.sol";
import { CommonTypes } from "filecoin-solidity/contracts/v0.8/types/CommonTypes.sol";
import { MarketTypes } from "filecoin-solidity/contracts/v0.8/types/MarketTypes.sol";
import { BigInt } from "filecoin-solidity/contracts/v0.8/cbor/BigIntCbor.sol";
```

## Complementary lectures
Expand All @@ -113,13 +123,10 @@ If you’re starting totally new, we got you! Here’s a 101 conceptual read on

Find nice articles with rich and valuable content about different topics related to Filecoin network.

## Looking for a JS library to interact with Filecoin? :wrench::hammer:
## Looking for the complete documentation? :books::books:

We have been working hard to create a complete library that covers every aspect you may need in order to interact with
the Filecoin blockchain. [Let's go to library](https://www.npmjs.com/package/@zondax/izari-filecoin) :arrow_upper_right:
Filecoin solidity documentation: [Let's go to docs web](https://docs.filecoin.io/smart-contracts/developing-contracts/solidity-libraries/) :arrow_upper_right:

## Looking for the complete documentation? :books::books:
---

We have built this beautiful website for you!
[Let's go to docs web](https://docs.zondax.ch/fevm/filecoin-solidity) :arrow_upper_right:

_**Information for `filecoin-solidity` lib developers is contained in [./lib-dev](./lib-dev)**_
Loading

0 comments on commit e64da9c

Please sign in to comment.