-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Subgraph: Added GovernorBravoDelegate * Gateway: Subgraph integration first draft * Gateway cleanup * Subgraph: Local deployment * update package.json for L1 and L2 * Update README.md * query adaption * clean * Update contract address * subgraph dao fix/adaptation * further fixes: GraphQL Service * Gateway: Using graphql lib now * other library * update package.json * enable the graph for rinkeby proposal lookup * system working now * Update address * enable DAO proposal title display Co-authored-by: CAPtheorem <79423264+CAPtheorem@users.noreply.github.com> Co-authored-by: cby3149 <cby3149@gmail.com>
- Loading branch information
1 parent
e2a671b
commit 0bedbb8
Showing
27 changed files
with
1,615 additions
and
59 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,8 @@ temp | |
coverage.json | ||
*.tsbuildinfo | ||
|
||
.idea/ | ||
|
||
dist | ||
artifacts | ||
cache | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 @@ | ||
.idea |
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
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
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,37 @@ | ||
const apollo = require('@apollo/client') | ||
const fetch = require('cross-fetch') | ||
|
||
require('dotenv').config() | ||
|
||
class GraphQLService { | ||
|
||
getBridgeEndpoint = () => { | ||
return `https://graph.${process.env.REACT_APP_CHAIN ?? 'rinkeby'}.boba.network/subgraphs/name/boba/Bridges` | ||
} | ||
|
||
async queryBridgeProposalCreated() { | ||
|
||
const query = apollo.gql(`query { governorProposalCreateds { proposalId values description proposer } }`) | ||
|
||
/* | ||
curl -g -X POST \ | ||
-H "Content-Type: application/json" \ | ||
-d '{"query":"{ governorProposalCreateds {proposalId values description proposer}}"}' \ | ||
https://graph.rinkeby.boba.network/subgraphs/name/boba/Bridges | ||
*/ | ||
|
||
const client = new apollo.ApolloClient({ | ||
uri: this.getBridgeEndpoint(), | ||
link: new apollo.HttpLink({ | ||
uri: this.getBridgeEndpoint(), | ||
fetch | ||
}), | ||
cache: new apollo.InMemoryCache() | ||
}) | ||
|
||
return await client.query({ query }) | ||
} | ||
} | ||
|
||
const graphQLService = new GraphQLService() | ||
export default graphQLService |
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
Oops, something went wrong.