Skip to content

Commit

Permalink
Merge pull request #475 from JoinColony/next
Browse files Browse the repository at this point in the history
Support CeruleanLightweightSpaceship
  • Loading branch information
rdig authored Feb 15, 2021
2 parents af6853c + 3cc77e2 commit 983e287
Show file tree
Hide file tree
Showing 55 changed files with 46,547 additions and 305 deletions.
4 changes: 0 additions & 4 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
[submodule "lib/colonyNetwork"]
path = lib/colonyNetwork
url = https://github.com/JoinColony/colonyNetwork.git
ignore = all
[submodule "vendor/colonyNetwork"]
path = vendor/colonyNetwork
url = https://github.com/JoinColony/colonyNetwork.git
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
12.16.3
12.19.0
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

## NEXT

* Extensions
* Coin Machine
* FundingQueue
* OneTxPayment
* VotingReputation

## v1.14.6
**Features**

Expand Down
7 changes: 7 additions & 0 deletions DAPP_MIGRATION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Dapp migrations

Here's a list of breaking changes that need to be adjusted for the different colonyNetwork versions

## v4 -> v5

1) OneTxPayment makePaymentWithProofs and makePaymentFundedFromDomainWithProofs argument adjustments (array instead of strings)
93 changes: 85 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div align="center">
<img src="colonyJS_color.svg" width="600" />
<img src="media/colonyJS_color.svg" width="600" />
</div>

# colonyJS
Expand Down Expand Up @@ -37,7 +37,12 @@ const networkAddress = '0xdabbad00';
console.log('Wallet Address:', wallet.address);

// Get a network client instance
const networkClient = await getColonyNetworkClient(Network.Local, wallet, networkAddress)
const networkClient = await getColonyNetworkClient(
Network.Local,
wallet,
// The address of the locally deployed EtherRouter!
{ networkAddress: '0xdabbad00' }
);

// Check out the logs to see the network address
console.log('Network Address:', networkClient.address);
Expand All @@ -58,49 +63,121 @@ We welcome all contributions to colonyJS! See [Contributing](https://github.com/

## Development

### Local development

Using just `npm` you can _link_ the built colonyJS files to your Dapp when developing new features in colonyJS while trying them out immediately in your dev-environment.

To do that:

1) Make sure you are using **the exact same node version in colonyJS and the Dapp**. Use nvm if possible

2) Update the required submodules:

```shell
git submodule update --init --recursive
```

3) Build colonyJS. In the colonyJS directory do:

```shell
npm run build
```

4) Create an `npm link` in the colonyJS directory:

```shell
npm link
```

5) Link to it in the **Dapp** directory:

```shell
npm link @colony/colony-js
```

6) Then do a regular install in the Dapp directory:

```shell
npm install
```

To overwrite the link again just specify a version that exists on npm:

```shell
npm install @colony/colony-js@^3.0.0
```

If that doesn't remove it, just remove the folder in `node_modules`

### To release a new version

1) First, commit all your changes. Then run the tests:

```bash
```shell
npm test #just to be sure
```

2) Adjust the version in `package.json`

3) Let npm adjust the version in `package-lock.json`:

```bash
```shell
npm install
```

4) Commit the npm package files. Use the version set in the package.json (**make sure to follow the version pattern**):

```bash
```shell
git add pack*
git commit -m '2.0.1' # no `v`!
```

5) Tag the commit:

```bash
```shell
git tag v2.0.1 # here we use the `v`!
```

6) Push the changes and tags:

```bash
```shell
git push && git push --tags
```

7) Publish on npm:

```
npm publish --access=public
npm publish --access=public
```

Done 🎊

### To upgrade to a new colonyNetwork version

1) Add the version to `constants.ts` in `ColonyVersion`
2) Change the `CurrentVersion` variable to the one you just added
3) Add the git tag to `scripts/config.ts`
4) _Optional:_ If you are tracking a development branch instead of a static tag or commit, make sure to pull the latest changes, otherwise the contracts generated will be exactly the same as your last ones -- _this is a step often forgotten when using a dev version_
5) If needed: add new contracts that need clients to the `contractsToBuild` array in `scripts/build-contracts.ts`
6) Run
```shell
DISABLE_DOCKER=true npm run build-contracts -- -V=X
```

where `X` is the version number you just added (the incremental integer of the `ColonyVersion` enum).

This will create a new folder: `src/contracts/X` containing all the type definitions you'll need to implement the new colony client.

7) Update the following lines in `ColonyNetworkClient.ts` to reflect the new version:

```ts
import { IColonyNetworkFactory } from '../contracts/X/IColonyNetworkFactory';
import { IColonyNetwork } from '../contracts/X/IColonyNetwork';
```

8) Update all the other contract imports in the non-colony clients, even if they haven't been upgraded (just in case). Then make adjustments to the clients to reflect the contract changes (typescript will tell you, where to make changes). Also add necessary helper functions (e.g. `withProofs` functions) for newly added methods. The newly added methods and their required roles can be found in [this file](https://github.com/JoinColony/colonyNetwork/blob/develop/contracts/colony/ColonyAuthority.sol) (and by diffing the generated interface files).


## License

GPL-3.0
File renamed without changes
Loading

0 comments on commit 983e287

Please sign in to comment.