Skip to content

Commit

Permalink
feat: Add optimism config (#51)
Browse files Browse the repository at this point in the history
* add optimism config

* add deployments md

---------

Co-authored-by: Federico Madoery <[email protected]>
  • Loading branch information
Agupane and FedeMadoery authored Jun 11, 2024
1 parent c62af79 commit 93b4e25
Show file tree
Hide file tree
Showing 4 changed files with 69 additions and 5 deletions.
3 changes: 2 additions & 1 deletion codegen/render-templates.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ const chainNameToChainId = {
polygon: 137,
matic: 137, // Added to avoid bugs
mumbai: 80001,
avalanche: 43114
avalanche: 43114,
optimism: 10
};

const getTemplateData = () => {
Expand Down
40 changes: 40 additions & 0 deletions deployments.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<div style="text-align: center;">
<a href="https://thebadge.xyz">
<img alt="TheBadge" src="https://www.thebadge.xyz/the_badge_github_logo.png">
</a>
</div>

<h1 align="center">TheBadge Subgraph Deployments</h1>

<p align="center">
<a href="https://discord.com/invite/FTxtkgbAC4"><img src="https://img.shields.io/discord/1006480637512917033?style=plastic" alt="Join to Discord"></a>
<a href="https://github.com/thebadge/thebadge-subgraph/issues"><img src="https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat" alt="contributions welcome"></a>
<a href="https://twitter.com/intent/user?screen_name=thebadgexyz"><img src="https://img.shields.io/twitter/follow/thebadgexyz?style=social" alt="Follow us on Twitter"></a>
<a href="https://github.com/thebadge/thebadge-subgraph/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue.svg" alt="MIT licensed"></a>
<a href="https://github.com/thebadge/thebadge-subgraph/releases"><img src="https://img.shields.io/github/v/release/thebadge/thebadge-subgraph?label=Latest%20Release" alt="Latest release"></a>
</p>

### Develop

| Chain Name | URL |
|-----------------|-------------------------------------------------------------------------------------------|
| Goerli (5) | [https://api.studio.thegraph.com/query/51391/thebadge-goerli-dev/version/latest](https://api.studio.thegraph.com/query/51391/thebadge-goerli-dev/version/latest) |
| Sepolia (11155111) | [https://api.studio.thegraph.com/query/51391/thebadge-sepolia-dev/version/latest](https://api.studio.thegraph.com/query/51391/thebadge-sepolia-dev/version/latest) |
| Gnosis (100) | [https://api.studio.thegraph.com/query/51391/thebadge-gnosis-prod/version/latest](https://api.studio.thegraph.com/query/51391/thebadge-gnosis-prod/version/latest) |
| Mumbai (80001) | [https://api.studio.thegraph.com/query/51391/thebadge-mumbai-prod/version/latest](https://api.studio.thegraph.com/query/51391/thebadge-mumbai-prod/version/latest) |
| Polygon (137) | [https://api.studio.thegraph.com/query/51391/thebadge-polygon-prod/version/latest](https://api.studio.thegraph.com/query/51391/thebadge-polygon-prod/version/latest) |
| Avalanche (43114) | [https://api.studio.thegraph.com/query/51391/thebadge-avax-prod/version/latest](https://api.studio.thegraph.com/query/51391/thebadge-avax-prod/version/latest) |
| Optimism (10) | [https://api.studio.thegraph.com/query/51391/thebadge-optimism-prod/version/latest](https://api.studio.thegraph.com/query/51391/thebadge-optimism-prod/version/latest) |


### Prod

| Chain Name | URL |
|-----------------|---------------------------------------------------------------------------------------------|
| Goerli (5) | [https://api.studio.thegraph.com/query/51391/thebadge-goerli-staging/version/latest](https://api.studio.thegraph.com/query/51391/thebadge-goerli-staging/version/latest) |
| Sepolia (11155111) | [https://api.studio.thegraph.com/query/51391/thebadge-sepolia-staging/version/latest](https://api.studio.thegraph.com/query/51391/thebadge-sepolia-staging/version/latest) |
| Gnosis (100) | [https://api.studio.thegraph.com/query/51391/thebadge-gnosis-prod/version/latest](https://api.studio.thegraph.com/query/51391/thebadge-gnosis-prod/version/latest) |
| Mumbai (80001) | [https://api.studio.thegraph.com/query/51391/thebadge-mumbai-prod/version/latest](https://api.studio.thegraph.com/query/51391/thebadge-mumbai-prod/version/latest) |
| Polygon (137) | [https://api.studio.thegraph.com/query/51391/thebadge-polygon-prod/version/latest](https://api.studio.thegraph.com/query/51391/thebadge-polygon-prod/version/latest) |
| Avalanche (43114) | [https://api.studio.thegraph.com/query/51391/thebadge-avax-prod/version/latest](https://api.studio.thegraph.com/query/51391/thebadge-avax-prod/version/latest) |
| Optimism (10) | [https://api.studio.thegraph.com/query/51391/thebadge-optimism-prod/version/latest](https://api.studio.thegraph.com/query/51391/thebadge-optimism-prod/version/latest) |
28 changes: 24 additions & 4 deletions networks.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@
},
"43114": {
"address": "0xd7859d7f8fc33Eee2df9edbafd247a2F398087a6",
"startBlock": 46422838
"startBlock": 46423013
},
"10": {
"address": "0xd7859d7f8fc33Eee2df9edbafd247a2F398087a6",
"startBlock": 121205976
}
},
"TheBadgeUsers": {
Expand All @@ -48,7 +52,11 @@
},
"43114": {
"address": "0xDb5c2bcfD8cc522B8DD634DC507E135383049566",
"startBlock": 46422838
"startBlock": 46423001
},
"10": {
"address": "0xDb5c2bcfD8cc522B8DD634DC507E135383049566",
"startBlock": 121205961
}
},
"TheBadgeModels": {
Expand All @@ -74,7 +82,11 @@
},
"43114": {
"address": "0xd53Ec6aB9242cD8f8A8aa839BA91BDeDe6219475",
"startBlock": 46422838
"startBlock": 46423007
},
"10": {
"address": "0xDb5c2bcfD8cc522B8DD634DC507E135383049566",
"startBlock": 121205961
}
},
"KlerosBadgeModelController": {
Expand All @@ -97,6 +109,10 @@
"43114": {
"address": "0xf668aff78410CAB48ccEB5c804704050c2096eC2",
"startBlock": 46422838
},
"10": {
"address": "0xf668aff78410CAB48ccEB5c804704050c2096eC2",
"startBlock": 121206147
}
},
"TpBadgeModelController": {
Expand All @@ -122,7 +138,11 @@
},
"43114": {
"address": "0xA76ba1A457BBCBc4736D9a9028dD29f4e89322e5",
"startBlock": 46422838
"startBlock": 46423036
},
"10": {
"address": "0xf668aff78410CAB48ccEB5c804704050c2096eC2",
"startBlock": 121206147
}
}
}
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,14 @@
"codegen:matic": "node codegen/render-templates.js matic && graph codegen",
"codegen:mumbai": "node codegen/render-templates.js mumbai && graph codegen",
"codegen:avalanche": "node codegen/render-templates.js avalanche && graph codegen",
"codegen:optimism": "node codegen/render-templates.js optimism && graph codegen",
"build:goerli": "yarn codegen:goerli && graph build",
"build:sepolia": "yarn codegen:sepolia && graph build",
"build:gnosis": "yarn codegen:gnosis && graph build",
"build:matic": "yarn codegen:matic && graph build",
"build:mumbai": "yarn codegen:mumbai && graph build",
"build:avalanche": "yarn codegen:avalanche && graph build",
"build:optimism": "yarn codegen:optimism && graph build",
"deploy:mumbai-dev": "yarn build:mumbai && graph deploy --version-label=${npm_package_version} --studio thebadge-mumbai-prod",
"deploy:sepolia-dev": "yarn build:sepolia && graph deploy --version-label=${npm_package_version} --studio thebadge-sepolia-dev",
"deploy:sepolia-staging": "yarn build:sepolia && graph deploy --version-label=${npm_package_version} --studio thebadge-sepolia-staging",
Expand All @@ -26,6 +28,7 @@
"deploy:polygon-prod": "yarn build:matic && graph deploy --version-label=${npm_package_version} --studio thebadge-polygon-prod",
"deploy:matic-prod": "yarn build:matic && graph deploy --product hosted-service thebadgeadmin/thebadge-polygon-prod",
"deploy:avalanche": "yarn build:avalanche && graph deploy --version-label=${npm_package_version} --studio thebadge-avax-prod",
"deploy:optimism": "yarn build:optimism && graph deploy --version-label=${npm_package_version} --studio thebadge-optimism-prod",
"deploy:dev": "yarn deploy:goerli-dev && yarn deploy:sepolia-dev && yarn deploy:mumbai-dev",
"deploy:staging": "yarn deploy:goerli-staging && yarn deploy:sepolia-staging",
"deploy:prod": "yarn deploy:gnosis-prod && yarn deploy:polygon-prod",
Expand Down

0 comments on commit 93b4e25

Please sign in to comment.