Skip to content

Commit

Permalink
Merge pull request #218 from humanprotocol/feature/deploy-proxy-polygon
Browse files Browse the repository at this point in the history
Feature/deploy proxy polygon
  • Loading branch information
portuu3 authored Feb 3, 2023
2 parents a85a350 + 644abbe commit 089e93e
Show file tree
Hide file tree
Showing 9 changed files with 74 additions and 56 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cd-subgraph.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
matrix:
network:
- name: matic
graph: polygon
graph: polygon-v1
- name: goerli
graph: goerli-v1
- name: moonbeam
Expand Down
10 changes: 5 additions & 5 deletions CONTRACTS_LIST.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
| Polygon (Mainnet) | Contract | Address | Proxy |
|--------------------------|----------------|--------------------------------------------|--------------------------------------------|
|2021/10/13 | HMToken | 0xc748B2A084F8eFc47E086ccdDD9b7e67aEb571BF | N/A |
|2022/02/28 | EscrowFactory | 0x45eBc3eAE6DA485097054ae10BA1A0f8e8c7f794 | |
| | Staking | | |
| | RewardPool | | |
|2022/03/01 | EthKVStore | 0x6334dB76037bb6d4bc21901433E870b22ACa1F9a | N/A |
| | Reputation | | |
|2022/02/28 | EscrowFactory | 0xe44D7eb960f24797D36FAdD8a8FfF29C76375Ef0 | 0xBDBfD2cC708199C5640C6ECdf3B0F4A4C67AdfcB |
| | Staking | 0xC2163A0928034e020f0d31e1171Ba0D6d9AfFB6c | 0xcbAd56bE3f504E98bd70875823d3CC0242B7bB29 |
| | RewardPool | 0x25E53A6D48A2744273C082e55bA5CCFCfD80f9e1 | 0xa8e32d777a3839440cc7c24D591A64B9481753B3 |
|2022/03/01 | EthKVStore | 0x35Cf4beBD58F9C8D75B9eA2599479b6C173d406F | N/A |
| | Reputation | N/A | N/A |

| Polygon Mumbai (Testnet) | Contract | Address | Proxy |
|--------------------------|----------------|--------------------------------------------|--------------------------------------------|
Expand Down
4 changes: 2 additions & 2 deletions packages/apps/escrow-dashboard/src/constants/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ export const ESCROW_NETWORKS: {
scanUrl: 'https://polygonscan.com',
rpcUrl: 'https://polygon-rpc.com/',
subgraphUrl:
'https://api.thegraph.com/subgraphs/name/humanprotocol/polygon',
factoryAddress: '0x45eBc3eAE6DA485097054ae10BA1A0f8e8c7f794',
'https://api.thegraph.com/subgraphs/name/humanprotocol/polygon-v1',
factoryAddress: '0xBDBfD2cC708199C5640C6ECdf3B0F4A4C67AdfcB',
hmtAddress: '0xc748B2A084F8eFc47E086ccdDD9b7e67aEb571BF',
},
[ChainId.POLYGON_MUMBAI]: {
Expand Down
8 changes: 8 additions & 0 deletions packages/core/hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,13 @@ const config: HardhatUserConfig = {
accounts:
process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [],
},
polygon: {
chainId: 137,
url: process.env.ETH_POLYGON_URL || '',
accounts:
process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [],
timeout: 1000000000,
},
polygonMumbai: {
chainId: 80001,
url: process.env.ETH_POLYGON_MUMBAI_URL || '',
Expand Down Expand Up @@ -128,6 +135,7 @@ const config: HardhatUserConfig = {
// For Mainnet, Goerli
mainnet: process.env.ETHERSCAN_API_KEY || '',
goerli: process.env.ETHERSCAN_API_KEY || '',
polygon: process.env.POLYGONSCAN_API_KEY || '',
polygonMumbai: process.env.POLYGONSCAN_API_KEY || '',
bscTestnet: process.env.BSC_TESTNET_API_KEY || '',
moonbaseAlpha: process.env.MOONSCAN_API_KEY || '',
Expand Down
58 changes: 29 additions & 29 deletions packages/examples/fortune/launcher/client/src/constants/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,15 @@ export const ESCROW_NETWORKS: {
factoryAddress: '0x87469B4f2Fcf37cBd34E54244c0BD4Fa0603664c',
hmtAddress: '0xd3A31D57FDD790725d0F6B78095F62E8CD4ab317',
},
[ChainId.BSC_MAINNET]: {
chainId: ChainId.BSC_MAINNET,
title: 'Binance Smart Chain',
scanUrl: 'https://bscscan.com',
rpcUrl: 'https://bsc-dataseed1.binance.org/',
subgraphUrl: 'https://api.thegraph.com/subgraphs/name/humanprotocol/bsc',
factoryAddress: '0xc88bC422cAAb2ac8812de03176402dbcA09533f4',
hmtAddress: '0x0d501B743F22b641B8C8dfe00F1AAb881D57DDC7',
},
// [ChainId.BSC_MAINNET]: {
// chainId: ChainId.BSC_MAINNET,
// title: 'Binance Smart Chain',
// scanUrl: 'https://bscscan.com',
// rpcUrl: 'https://bsc-dataseed1.binance.org/',
// subgraphUrl: 'https://api.thegraph.com/subgraphs/name/humanprotocol/bsc',
// factoryAddress: '0xc88bC422cAAb2ac8812de03176402dbcA09533f4',
// hmtAddress: '0x0d501B743F22b641B8C8dfe00F1AAb881D57DDC7',
// },
[ChainId.BSC_TESTNET]: {
chainId: ChainId.BSC_TESTNET,
title: 'Binance Smart Chain (Testnet)',
Expand All @@ -59,16 +59,16 @@ export const ESCROW_NETWORKS: {
factoryAddress: '0x2bfA592DBDaF434DDcbb893B1916120d181DAD18',
hmtAddress: '0xE3D74BBFa45B4bCa69FF28891fBE392f4B4d4e4d',
},
[ChainId.POLYGON]: {
chainId: ChainId.POLYGON,
title: 'Polygon',
scanUrl: 'https://polygonscan.com',
rpcUrl: 'https://polygon-rpc.com/',
subgraphUrl:
'https://api.thegraph.com/subgraphs/name/humanprotocol/polygon',
factoryAddress: '0x45eBc3eAE6DA485097054ae10BA1A0f8e8c7f794',
hmtAddress: '0xc748B2A084F8eFc47E086ccdDD9b7e67aEb571BF',
},
// [ChainId.POLYGON]: {
// chainId: ChainId.POLYGON,
// title: 'Polygon',
// scanUrl: 'https://polygonscan.com',
// rpcUrl: 'https://polygon-rpc.com/',
// subgraphUrl:
// 'https://api.thegraph.com/subgraphs/name/humanprotocol/polygon',
// factoryAddress: '0xBDBfD2cC708199C5640C6ECdf3B0F4A4C67AdfcB',
// hmtAddress: '0xc748B2A084F8eFc47E086ccdDD9b7e67aEb571BF',
// },
[ChainId.POLYGON_MUMBAI]: {
chainId: ChainId.POLYGON_MUMBAI,
title: 'Polygon Mumbai',
Expand All @@ -79,16 +79,16 @@ export const ESCROW_NETWORKS: {
factoryAddress: '0xA8D927C4DA17A6b71675d2D49dFda4E9eBE58f2d',
hmtAddress: '0x0376D26246Eb35FF4F9924cF13E6C05fd0bD7Fb4',
},
[ChainId.MOONBEAM]: {
chainId: ChainId.MOONBEAM,
title: 'Moonbeam',
scanUrl: 'https://moonbeam.moonscan.io',
rpcUrl: 'https://rpc.api.moonbeam.network',
subgraphUrl:
'https://api.thegraph.com/subgraphs/name/humanprotocol/moonbeam',
factoryAddress: '0x98108c28B7767a52BE38B4860832dd4e11A7ecad',
hmtAddress: '0x3b25BC1dC591D24d60560d0135D6750A561D4764',
},
// [ChainId.MOONBEAM]: {
// chainId: ChainId.MOONBEAM,
// title: 'Moonbeam',
// scanUrl: 'https://moonbeam.moonscan.io',
// rpcUrl: 'https://rpc.api.moonbeam.network',
// subgraphUrl:
// 'https://api.thegraph.com/subgraphs/name/humanprotocol/moonbeam',
// factoryAddress: '0x98108c28B7767a52BE38B4860832dd4e11A7ecad',
// hmtAddress: '0x3b25BC1dC591D24d60560d0135D6750A561D4764',
// },
};

export const HM_TOKEN_DECIMALS = 18;
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export const ESCROW_NETWORKS: {
// rpcUrl: 'https://polygon-rpc.com/',
// subgraphUrl:
// 'https://api.thegraph.com/subgraphs/name/humanprotocol/polygon',
// factoryAddress: '0x45eBc3eAE6DA485097054ae10BA1A0f8e8c7f794',
// factoryAddress: '0xBDBfD2cC708199C5640C6ECdf3B0F4A4C67AdfcB',
// hmtAddress: '0xc748B2A084F8eFc47E086ccdDD9b7e67aEb571BF',
// },
[ChainId.POLYGON_MUMBAI]: {
Expand Down
17 changes: 0 additions & 17 deletions packages/sdk/typescript/subgraph/config/matic.json

This file was deleted.

27 changes: 27 additions & 0 deletions packages/sdk/typescript/subgraph/config/polygon-v1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"network": "matic",
"description": "Human subgraph on Polygon network",
"EscrowFactory": {
"address": "0xBDBfD2cC708199C5640C6ECdf3B0F4A4C67AdfcB",
"startBlock": 38858552,
"abi": "./node_modules/@human-protocol/core/abis/EscrowFactory.json"
},
"HMToken": {
"address": "0xc748B2A084F8eFc47E086ccdDD9b7e67aEb571Bf",
"startBlock": 20181700,
"abi": "./node_modules/@human-protocol/core/abis/HMToken.json"
},
"Escrow": {
"abi": "./node_modules/@human-protocol/core/abis/Escrow.json"
},
"Staking": {
"address": "0xcbAd56bE3f504E98bd70875823d3CC0242B7bB29",
"startBlock": 38858545,
"abi": "./node_modules/@human-protocol/core/abis/Staking.json"
},
"KVStore": {
"address": "0x35Cf4beBD58F9C8D75B9eA2599479b6C173d406F",
"startBlock": 38858596,
"abi": "./node_modules/@human-protocol/core/abis/KVStore.json"
}
}
2 changes: 1 addition & 1 deletion packages/sdk/typescript/subgraph/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"pretest": "NETWORK=goerli-v1 yarn generate",
"test": "graph test",
"deploy": "graph deploy --node https://api.thegraph.com/deploy/ posix4e/humansubgraph",
"quickstart:matic": "NETWORK=matic yarn generate && graph create --node http://localhost:8020/ posix4e/humansubgraph",
"quickstart:matic": "NETWORK=polygon yarn generate && graph create --node http://localhost:8020/ posix4e/humansubgraph",
"quickstart:goerli": "NETWORK=goerli yarn generate && graph create --node http://localhost:8020/ posix4e/humansubgraph",
"quickstart:mumbai": "NETWORK=mumbai yarn generate && graph create --node http://localhost:8020/ posix4e/humansubgraph",
"quickstart:avalanche": "NETWORK=avalanche yarn generate && graph create --node http://localhost:8020/ posix4e/humansubgraph",
Expand Down

2 comments on commit 089e93e

@vercel
Copy link

@vercel vercel bot commented on 089e93e Feb 3, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

job-launcher-client – ./packages/examples/fortune/launcher/client

job-launcher-client-git-feat-staking-slashing-humanprotocol.vercel.app
job-launcher-client-humanprotocol.vercel.app
job-launcher-client.vercel.app

@vercel
Copy link

@vercel vercel bot commented on 089e93e Feb 3, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

job-launcher-server – ./packages/examples/fortune/launcher/server

Please sign in to comment.