Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Claiming expenditure payout #925

Merged
merged 18 commits into from
Aug 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 20 additions & 5 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
An iteration of the Colony Dapp sporting both a fully decentralized operating mode, as well as a mode enhanced by a metadata caching layer.

## Prerequisites
* `node` `v16.16.x` (Best use [nvm](https://github.com/nvm-sh/nvm))
* `npm` `v8.11.x` _(At least. The newer, the better)_
* `docker` `v19.03.0+` (See [install instructions](https://docs.docker.com/engine/install/))

- `node` `v16.16.x` (Best use [nvm](https://github.com/nvm-sh/nvm))
- `npm` `v8.11.x` _(At least. The newer, the better)_
- `docker` `v19.03.0+` (See [install instructions](https://docs.docker.com/engine/install/))

## Installation

Expand Down Expand Up @@ -33,13 +34,14 @@ _Note: at the end of the install there's a post-install script that will recursi
npm run dev
```

This will build your local docker images, then attempt to start them _(the local dev environment runs inside a couple of docker containers).
This will build your local docker images, then attempt to start them \_(the local dev environment runs inside a couple of docker containers).

On the next start, assuming no key cache files changed, it will skip the image building step _(as it will just used the cached version)_, and go straight to starting your environment.

## Running the dev web server

Once the above dev environment is up and running, you need to start your dev web server, running through webpack:

```bash
npm run webpack
```
Expand All @@ -63,6 +65,7 @@ You can also view the status of the reputation monitor using the following URL:
### Truffle

If needed, the truffle console is available to you via:

```bash
npm run truffle console
```
Expand All @@ -72,27 +75,31 @@ _NOTE: This only works while the environment is running_
## Building the bundle locally

If you want to build the bundle locally for inspection, you can do it via:

```bash
npm run webpack:build
````
```

_Note: It's a straight-up dev build. Just bundled, no code optimizations whatsoever._

## Linting

Linting your code via `eslint` can be done as such:

```bash
npm run lint
```

To lint the project's style sheets you run:

```bash
npm run stylelint
```

## Type checking

Type checking using TypeScript can be accessed using this npm script:

```bash
npm run typecheck

Expand All @@ -108,4 +115,12 @@ To run unit tests you have the following npm script:
npm run test
```

## Upgrading `colony-js`

When upgrading `colony-js` package, you usually want to do it for not just CDapp but also all the lambdas that depend on it. There's an `upgrade-colony-js` script that does it for you:

```bash
npm run upgrade-colony-js <version>
```

Twemoji graphics made by Twitter and other contributors, licensed under CC-BY 4.0: https://creativecommons.org/licenses/by/4.0/
1 change: 1 addition & 0 deletions amplify/backend/api/colonycdapp/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -2528,6 +2528,7 @@ type Expenditure @model {
metadata: ExpenditureMetadata @hasOne(fields: ["id"])
balances: [ExpenditureBalance!]
@function(name: "fetchExpenditureBalances-${env}")
finalizedAt: AWSTimestamp
}

# Each expenditure can have multiple slots with one recipient and possibly multiple payouts (with different token addresses)
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"@types/aws-lambda": "^8.10.92"
},
"dependencies": {
"@colony/colony-js": "^6.3.6",
"@colony/colony-js": "^6.5.0-next.0",
"ethers": "^5.7.2",
"node-fetch": "2.6.7"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,12 @@
},
"Role": { "Fn::GetAtt": ["LambdaExecutionRole", "Arn"] },
"Runtime": "nodejs14.x",
"Layers": [],
"Layers": [
{
"Ref": "functioncolonycdappSSMAccessArn"
},
"arn:aws:lambda:eu-west-2:133256977650:layer:AWS-Parameters-and-Secrets-Lambda-Extension:4"
],
"Timeout": 25
}
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
{
"lambdaLayers": []
"lambdaLayers": [
{
"type": "ProjectLayer",
"resourceName": "colonycdappSSMAccess",
"env": "qa",
"version": "Always choose latest version",
"isLatestVersionSelected": true
},
{
"type": "ExternalLayer",
"arn": "arn:aws:lambda:eu-west-2:133256977650:layer:AWS-Parameters-and-Secrets-Lambda-Extension:4"
}
]
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"@types/aws-lambda": "^8.10.92"
},
"dependencies": {
"@colony/colony-js": "^6.4.0",
"@colony/colony-js": "^6.5.0-next.0",
"ethers": "^5.7.2"
}
}
14 changes: 7 additions & 7 deletions amplify/backend/function/fetchMotionState/src/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions amplify/backend/function/fetchMotionState/src/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@
"@types/aws-lambda": "^8.10.92"
},
"dependencies": {
"@colony/colony-js": "^6.3.5",
"@colony/colony-js": "^6.5.0-next.0",
"ethers": "^5.1.3",
"node-fetch": "2.6.7"

}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"@types/aws-lambda": "^8.10.92"
},
"dependencies": {
"@colony/colony-js": "^6.3.6",
"@colony/colony-js": "^6.5.0-next.0",
"ethers": "^5.7.2"
}
}
14 changes: 7 additions & 7 deletions amplify/backend/function/fetchVoterRewards/src/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"@types/aws-lambda": "^8.10.92"
},
"dependencies": {
"@colony/colony-js": "^6.3.5",
"@colony/colony-js": "^6.5.0-next.0",
"ethers": "^5.1.3",
"node-fetch": "2.6.7"
}
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"@types/aws-lambda": "^8.10.92"
},
"dependencies": {
"@colony/colony-js": "^6.3.6",
"@colony/colony-js": "^6.5.0-next.0",
"decimal.js": "^10.2.1",
"ethers": "^5.7.1",
"node-fetch": "2.6.7"
Expand Down
Loading