This repository has been archived by the owner on Dec 7, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #96 from beehive-innovation/2021-09-10-npm-package
npm package & remove submodule dependency
- Loading branch information
Showing
23 changed files
with
775 additions
and
506 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: Publish npm package | ||
|
||
on: | ||
create: | ||
tags: ["v[0-9]+.[0-9]+.[0-9]+*"] | ||
|
||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- env: | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
token: ${{ secrets.ACCESS_TOKEN }} | ||
|
||
- name: Install nix | ||
uses: cachix/install-nix-action@v13 | ||
with: | ||
nix_path: nixpkgs=channel:nixos-unstable | ||
|
||
- name: Prepack for npm | ||
run: nix-shell --run prepack | ||
|
||
- name: Publish to npm | ||
run: nix-shell --run publish |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,3 +11,5 @@ bin | |
!dist/**/artifacts | ||
docs/api | ||
bin | ||
*.tgz | ||
.npmrc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +0,0 @@ | ||
[submodule "contracts/configurable-rights-pool"] | ||
path = contracts/configurable-rights-pool | ||
url = [email protected]:balancer-labs/configurable-rights-pool.git | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,20 +2,44 @@ | |
|
||
Rain Protocol supports fair value capture for intangible or physical assets in a permissionless way in any decentralised environment. | ||
|
||
Documentation can be found [here](https://beehive-innovation.github.io/rain-protocol). | ||
## Installation | ||
|
||
```console | ||
npm install rain-protocol | ||
``` | ||
|
||
## Development setup (contributors) | ||
## Usage | ||
|
||
### Git submodules | ||
### Importing contracts | ||
|
||
As we are wrapping balancer contracts, we have git submodules pointing to their repositories. | ||
```solidity | ||
pragma solidity ^0.6.12; | ||
import "rain-protocol/contracts/ReadWriteTier.sol"; | ||
contract MyContract is ReadWriteTier { | ||
... | ||
} | ||
``` | ||
|
||
When you clone this repository make sure to use `--recurse-submodules` | ||
### Importing contract [artifact](https://hardhat.org/guides/compile-contracts.html#artifacts) (e.g. abi, bytecode) | ||
|
||
```typescript | ||
const trustJson = require("rain-protocol/artifacts/Trust.json"); | ||
``` | ||
git clone --recurse-submodules [email protected]:thedavidmeister/tv-balancer.git | ||
|
||
### Using with [TypeChain](https://github.com/dethcrypto/TypeChain) | ||
|
||
```typescript | ||
import type { Trust } from "rain-protocol/typechain/Trust"; | ||
``` | ||
|
||
## Documentation | ||
|
||
Documentation can be found [here](https://beehive-innovation.github.io/rain-protocol). | ||
|
||
## Development setup (for contributors) | ||
|
||
### Nix Shell | ||
|
||
Install the nix shell if you haven't already. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule configurable-rights-pool
deleted from
5bd636
Oops, something went wrong.