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

Refactor API: ForwardingPath descriptions + App intent actions #256

Merged
merged 85 commits into from
Dec 30, 2020
Merged
Show file tree
Hide file tree
Changes from 68 commits
Commits
Show all changes
85 commits
Select commit Hold shift + click to select a range
5c4b021
Types: Update types definition
0xGabi Aug 20, 2020
e36825a
Types: Fix imports
0xGabi Aug 20, 2020
e3fb789
Refactor: update imports and definitions for Transction entity
0xGabi Aug 20, 2020
453b4ef
Refactor: Create Transaction entity & update how handle transactions
0xGabi Aug 20, 2020
163166a
Comment logic related to forwarding path description
0xGabi Aug 20, 2020
4c0890b
Comment logic related to forwarding path description
0xGabi Aug 20, 2020
552bda1
Merge branch 'refactor-transaction' of github.com:aragon/connect into…
0xGabi Aug 20, 2020
c6f1740
Refactor: Add Intent entity + refactor calculate path logic
0xGabi Aug 20, 2020
9456cbe
Refactor: Remove TransactionIntent entity + update logic
0xGabi Aug 20, 2020
d84e4b1
Fix import
0xGabi Aug 20, 2020
097325a
Refactor: Add ForwardingPath entity + update logic to describe a Forw…
0xGabi Aug 20, 2020
0d4bd4a
Merge
0xGabi Aug 26, 2020
867d0b3
Types: update types definition
0xGabi Aug 31, 2020
9f574f9
Core: Update Organization API
0xGabi Aug 31, 2020
8b28d2d
Core: Remove Intent entity + update App API
0xGabi Aug 31, 2020
81e4b28
Core: Calculate path logic + refactor utilities
0xGabi Aug 31, 2020
144bf47
Connector: fetch Repo latestsVersion
0xGabi Aug 31, 2020
fa6150b
Core: ForwardingPath descriptor logic
0xGabi Aug 31, 2020
d4c6cbf
Merge remote-tracking branch 'origin/master' into refactor-api
0xGabi Aug 31, 2020
c1afe43
Chore: Code cleanup
0xGabi Sep 1, 2020
613c7cc
Fix build
0xGabi Sep 1, 2020
2214b0a
Fix tests
0xGabi Sep 1, 2020
111305b
Merge branch 'refactor-api' of github.com:aragon/connect into refacto…
0xGabi Sep 1, 2020
a401390
Chore: clean code
0xGabi Sep 2, 2020
06b67f8
Chore: More code cleanups
0xGabi Sep 3, 2020
55eb610
Chore: fix typos
0xGabi Sep 3, 2020
d0d75ca
Add a few tests + clean code
0xGabi Sep 3, 2020
ad86cd1
Core: Add pre-transaction logic
0xGabi Sep 3, 2020
d69546a
Core: Fix radspec postprocess + findAppMethodFromData
0xGabi Sep 3, 2020
c385c6a
Core: remove side effects from postprocess function
0xGabi Sep 3, 2020
f3f5ae2
Core: Have a path object on the ForwardingPath
0xGabi Sep 4, 2020
40e596b
Tests: Fix disputable subgraph test
0xGabi Sep 8, 2020
e49264d
v0.8.0-alpha.1
0xGabi Sep 8, 2020
e7adcbb
Merge branch 'master' of github.com:aragon/connect into refactor-api
facuspagnuolo Sep 8, 2020
3d719b0
agreement: implement sign action
facuspagnuolo Sep 4, 2020
7315e10
agreement: implement close action
facuspagnuolo Sep 6, 2020
1b70b23
agreement: implement settle action
facuspagnuolo Sep 6, 2020
2781b43
core: support resetting erc20 approvals
facuspagnuolo Sep 7, 2020
b702303
agreement: implement challenge action
facuspagnuolo Sep 7, 2020
43e1f72
agreement: implement dispute action
facuspagnuolo Sep 7, 2020
ea96663
agreement: fail on not-found actions
facuspagnuolo Sep 8, 2020
4e6447b
Merge branch 'master' of github.com:aragon/connect into refactor-api
facuspagnuolo Sep 8, 2020
dd4c389
Merge branch 'refactor-api' of github.com:aragon/connect into agreeme…
facuspagnuolo Sep 8, 2020
8a73601
Core: use artifact roles data to postprocess description
0xGabi Sep 9, 2020
dcffe03
Merge remote-tracking branch 'origin/master' into refactor-api
0xGabi Sep 9, 2020
58e4757
Merge branch 'refactor-api' of github.com:aragon/connect into refacto…
0xGabi Sep 9, 2020
a1b1442
DisputableVoting: Implement new vote action
facuspagnuolo Sep 9, 2020
c283572
DisputableVoting: Implement cast vote action
facuspagnuolo Sep 9, 2020
aa99f9a
DisputableVoting: Remove vote unused internal method
facuspagnuolo Sep 9, 2020
c45b5ad
Agreement: Implement actions (#264)
facuspagnuolo Sep 9, 2020
6f82660
Merge branch 'refactor-api' into disputable_voting/implement_actions
0xGabi Sep 9, 2020
b900bd0
Update packages/connect-disputable-voting/subgraph/package.json
0xGabi Sep 9, 2020
49eee2d
Core: fix postprocess roles parsing
0xGabi Sep 9, 2020
f881b25
Merge remote-tracking branch 'origin/disputable_voting/implement_acti…
0xGabi Sep 9, 2020
3bb5f0e
Merge remote-tracking branch 'origin/disputable_voting/implement_acti…
0xGabi Sep 9, 2020
8da25a5
v0.8.0-alpha.2
0xGabi Sep 9, 2020
177b041
DisputableVoting: Compute actual quiet ending extension (#279)
facuspagnuolo Sep 9, 2020
721454a
DisputableVoting: Handle no settlement answer (#280)
facuspagnuolo Sep 10, 2020
50065ae
DisputableVoting: Fix has ended for implicit settlements (#282)
facuspagnuolo Sep 10, 2020
1c1508e
Agreement: Handle null signers (#281)
facuspagnuolo Sep 10, 2020
74d40bf
Merge branch 'refactor-api' of github.com:aragon/connect into refacto…
0xGabi Sep 10, 2020
45909c3
DisputableVoting: Fix collateral requirement parsing (#283)
facuspagnuolo Sep 11, 2020
8d6e154
Agreement: Update staking ABI (#284)
facuspagnuolo Sep 11, 2020
39b18b8
Core: fix abi overload case
0xGabi Sep 11, 2020
859ab3b
Merge branch 'refactor-api' of github.com:aragon/connect into refacto…
0xGabi Sep 11, 2020
4298d0f
v0.8.0-alpha.3
0xGabi Sep 11, 2020
8d66307
Core: Fix pre-approvals (#285)
facuspagnuolo Sep 11, 2020
a68783e
v0.8.0-alpha.4
facuspagnuolo Sep 11, 2020
b5b35f2
Agreement: Reduce staking movements complexity (#286)
facuspagnuolo Sep 14, 2020
1340963
DisputableVoting: Implement voting checks (#287)
facuspagnuolo Sep 14, 2020
1cbc0f6
v0.8.0-alpha.5
0xGabi Sep 14, 2020
7570926
Agreement: Allow nullable staking info (#293)
facuspagnuolo Sep 17, 2020
fc9c500
DisputableVoting: Implement settlement offer (#291)
facuspagnuolo Sep 17, 2020
47045de
Cache token symbols
facuspagnuolo Sep 17, 2020
5e762f5
Update agreement and disputable voting subraphs for rinkeby-staging
facuspagnuolo Sep 17, 2020
326357b
Agreement: Fix staking movement mapping
facuspagnuolo Sep 17, 2020
8184697
DisputableVoting: Implement has voted subscription
facuspagnuolo Sep 17, 2020
7208276
Examples: add forwarding-path (#290)
bpierre Sep 25, 2020
eca5746
Core: prefer generating signature from ABI (#292)
0xGabi Sep 25, 2020
085547e
Merge remote-tracking branch 'origin/master' into refactor-api
0xGabi Sep 25, 2020
62e622f
Chore: arrange imports
0xGabi Sep 25, 2020
081751a
Chore: fix type
0xGabi Sep 25, 2020
40288dd
Core: add changes from review comments
0xGabi Sep 26, 2020
6f063bf
Merge remote-tracking branch 'origin/master' into refactor-api
0xGabi Dec 30, 2020
1731eba
Core: add missing imports + update lock
0xGabi Dec 30, 2020
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
4 changes: 2 additions & 2 deletions examples/bundler-parcel/package.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"name": "bundler-parcel",
"private": true,
"version": "0.7.0",
"version": "0.8.0-alpha.4",
"main": "index.js",
"license": "MIT",
"scripts": {
"start": "parcel src/index.html",
"build": "parcel build src/index.html"
},
"dependencies": {
"@aragon/connect-react": "^0.7.0",
"@aragon/connect-react": "^0.8.0-alpha.4",
"react": "^16.13.1",
"react-dom": "^16.13.1",
"string.ify": "^1.0.64"
Expand Down
4 changes: 2 additions & 2 deletions examples/bundler-webpack-ts-loader/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "bundler-webpack-ts-loader",
"main": "dist/index.js",
"version": "0.7.0",
"version": "0.8.0-alpha.4",
"private": true,
"sideEffects": false,
"scripts": {
Expand All @@ -10,7 +10,7 @@
"clean": "rm -rf ./dist ./tsconfig.tsbuildinfo"
},
"dependencies": {
"@aragon/connect": "^0.7.0",
"@aragon/connect": "^0.8.0-alpha.4",
"react": "^16.13.1",
"react-dom": "^16.13.1"
},
Expand Down
2 changes: 1 addition & 1 deletion examples/connect-react-intro/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "connect-react-intro",
"private": true,
"version": "0.7.0",
"version": "0.8.0-alpha.4",
"scripts": {
"start": "snowpack dev",
"build": "snowpack build"
Expand Down
6 changes: 3 additions & 3 deletions examples/list-balances-cli/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "list-balances-cli",
"private": true,
"version": "0.7.0",
"version": "0.8.0-alpha.4",
"main": "index.js",
"license": "MIT",
"scripts": {
Expand All @@ -13,8 +13,8 @@
"typescript": "^3.9.6"
},
"dependencies": {
"@aragon/connect": "^0.7.0",
"@aragon/connect-voting": "^0.7.0",
"@aragon/connect": "^0.8.0-alpha.4",
"@aragon/connect-voting": "^0.8.0-alpha.4",
"token-amount": "^0.1.0"
}
}
6 changes: 3 additions & 3 deletions examples/list-votes-cli/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "list-votes-cli",
"private": true,
"version": "0.7.0",
"version": "0.8.0-alpha.4",
"main": "index.js",
"license": "MIT",
"scripts": {
Expand All @@ -13,7 +13,7 @@
"typescript": "^3.9.6"
},
"dependencies": {
"@aragon/connect": "^0.7.0",
"@aragon/connect-voting": "^0.7.0"
"@aragon/connect": "^0.8.0-alpha.4",
"@aragon/connect-voting": "^0.8.0-alpha.4"
}
}
6 changes: 3 additions & 3 deletions examples/list-votes-react/package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"name": "list-votes-react",
"private": true,
"version": "0.7.0",
"version": "0.8.0-alpha.4",
"scripts": {
"start": "snowpack dev",
"build": "snowpack build"
},
"dependencies": {
"@aragon/connect-react": "^0.7.0",
"@aragon/connect-voting": "^0.7.0",
"@aragon/connect-react": "^0.8.0-alpha.4",
"@aragon/connect-voting": "^0.8.0-alpha.4",
"@emotion/core": "^10.0.28",
"ethers": "^5.0.7",
"react": "^16.13.1",
Expand Down
4 changes: 2 additions & 2 deletions examples/minimal-setup-web/package.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"name": "minimal-setup-web",
"private": true,
"version": "0.7.0",
"version": "0.8.0-alpha.4",
"main": "index.js",
"license": "MIT",
"scripts": {
"start": "parcel index.html",
"build": "parcel build index.html"
},
"dependencies": {
"@aragon/connect-react": "^0.7.0",
"@aragon/connect-react": "^0.8.0-alpha.4",
"react": "^16.13.1",
"react-dom": "^16.13.1"
},
Expand Down
10 changes: 5 additions & 5 deletions examples/nodejs/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "nodejs",
"main": "dist/index.js",
"version": "0.7.0",
"version": "0.8.0-alpha.4",
"private": true,
"scripts": {
"build": "yarn clean && yarn compile",
Expand All @@ -22,10 +22,10 @@
"start-create-karma-template": "yarn build; node dist/src/create-karma-template.js"
},
"dependencies": {
"@aragon/connect": "^0.7.0",
"@aragon/connect-thegraph": "^0.7.0",
"@aragon/connect-tokens": "^0.7.0",
"@aragon/connect-voting": "^0.7.0",
"@aragon/connect": "^0.8.0-alpha.4",
"@aragon/connect-thegraph": "^0.8.0-alpha.4",
"@aragon/connect-tokens": "^0.8.0-alpha.4",
"@aragon/connect-voting": "^0.8.0-alpha.4",
"ethers": "^5.0.0",
"graphql-tag": "^2.10.3"
},
Expand Down
4 changes: 2 additions & 2 deletions examples/org-viewer-react/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "org-viewer-react",
"version": "0.7.0",
"version": "0.8.0-alpha.4",
"private": true,
"scripts": {
"start": "yarn clean && webpack-dev-server",
Expand All @@ -9,7 +9,7 @@
"clean": "rm -rf ./dist ./tsconfig.tsbuildinfo"
},
"dependencies": {
"@aragon/connect-react": "^0.7.0",
"@aragon/connect-react": "^0.8.0-alpha.4",
"@emotion/core": "^10.0.28",
"react": "^16.13.1",
"react-dom": "^16.13.1"
Expand Down
4 changes: 2 additions & 2 deletions examples/org-viewer-web/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "org-viewer-web",
"main": "dist/index.js",
"version": "0.7.0",
"version": "0.8.0-alpha.4",
"private": true,
"sideEffects": false,
"scripts": {
Expand All @@ -12,7 +12,7 @@
"compile": "tsc"
},
"dependencies": {
"@aragon/connect": "^0.7.0",
"@aragon/connect": "^0.8.0-alpha.4",
"@emotion/core": "^10.0.28",
"react": "^16.13.1",
"react-dom": "^16.13.1"
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@aragon/connect",
"version": "0.7.0",
"version": "0.8.0-alpha.4",
"description": "Access and interact with Aragon Organizations and their apps.",
"keywords": [
"ethereum",
Expand Down
1 change: 1 addition & 0 deletions packages/connect-agreement/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ module.exports = {
name: packageName,
displayName: 'AGREEMENT',
rootDir: '../..',
testTimeout: 10000
}
6 changes: 3 additions & 3 deletions packages/connect-agreement/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@aragon/connect-agreement",
"version": "0.7.0",
"version": "0.8.0-alpha.4",
"private": true,
"license": "LGPL-3.0-or-later",
"description": "Access and interact with Aragon Organizations and their apps.",
Expand Down Expand Up @@ -36,8 +36,8 @@
"lint": "eslint --ext .ts ./src"
},
"dependencies": {
"@aragon/connect-core": "^0.7.0",
"@aragon/connect-thegraph": "^0.7.0",
"@aragon/connect-core": "^0.8.0-alpha.4",
"@aragon/connect-thegraph": "^0.8.0-alpha.4",
"graphql-tag": "^2.10.3"
},
"devDependencies": {
Expand Down
25 changes: 8 additions & 17 deletions packages/connect-agreement/src/__test__/connector/signers.test.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import { AgreementConnectorTheGraph, Signer, Signature } from '../../../src'

const AGREEMENT_SUBGRAPH_URL =
'https://api.thegraph.com/subgraphs/name/aragon/aragon-agreement-rinkeby-staging'
const AGREEMENT_APP_ADDRESS = '0x9c92dbd8a8e5903e2741202321073091109f26be'
const SIGNER_ADDRESS = '0x0090aed150056316e37fe6dfa10dc63e79d173b6'
const AGREEMENT_SUBGRAPH_URL = 'https://api.thegraph.com/subgraphs/name/aragon/aragon-agreement-rinkeby-staging'

describe('Agreement signers', () => {
const SIGNER_ADDRESS = '0x0090aed150056316e37fe6dfa10dc63e79d173b6'
const SIGNER_ID = `${AGREEMENT_APP_ADDRESS}-signer-${SIGNER_ADDRESS}`

let connector: AgreementConnectorTheGraph

beforeAll(() => {
Expand All @@ -22,15 +23,11 @@ describe('Agreement signers', () => {
let signer: Signer

beforeAll(async () => {
signer = await connector.signer(
`${AGREEMENT_APP_ADDRESS}-signer-${SIGNER_ADDRESS}`
)
signer = (await connector.signer(SIGNER_ID))!
})

test('allows fetching signer information', async () => {
expect(signer.id).toBe(
`${AGREEMENT_APP_ADDRESS}-signer-${SIGNER_ADDRESS}`
)
expect(signer.id).toBe(SIGNER_ID)
expect(signer.address).toBe(SIGNER_ADDRESS)
expect(signer.agreementId).toBe(AGREEMENT_APP_ADDRESS)
})
Expand All @@ -40,20 +37,14 @@ describe('Agreement signers', () => {
let signatures: Signature[]

beforeAll(async () => {
signatures = await connector.signatures(
`${AGREEMENT_APP_ADDRESS}-signer-${SIGNER_ADDRESS}`,
1000,
0
)
signatures = await connector.signatures(SIGNER_ID, 1000, 0)
})

test('allows fetching signer information', async () => {
expect(signatures.length).toBeGreaterThan(0)

const lastSignature = signatures[signatures.length - 1]
expect(lastSignature.signerId).toBe(
`${AGREEMENT_APP_ADDRESS}-signer-${SIGNER_ADDRESS}`
)
expect(lastSignature.signerId).toBe(SIGNER_ID)
expect(lastSignature.versionId).toBe(`${AGREEMENT_APP_ADDRESS}-version-1`)
expect(lastSignature.createdAt).toBe('1598479718')
})
Expand Down
Loading