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

Add Skale Config #259

Closed
wants to merge 57 commits into from
Closed
Show file tree
Hide file tree
Changes from 14 commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
5cf984d
Add stripe card payment
flopez7 Feb 14, 2023
a2d8c35
Check card payment before fund and change fiat to HMT to fund the esc…
flopez7 Feb 15, 2023
a790926
Check parameters before approve or pay with card
flopez7 Feb 16, 2023
dac4222
Merge remote-tracking branch 'origin/main' into feature/fortune-card-…
flopez7 Feb 17, 2023
744a366
Merge remote-tracking branch 'origin/main' into feature/fortune-card-…
flopez7 Feb 17, 2023
04ea5df
Update .env.development
flopez7 Feb 17, 2023
6f86b84
Improve fortune server, check balance on client before send the reque…
flopez7 Feb 17, 2023
d6e7690
Add Skale Config
AzizBardi Feb 22, 2023
f9e45e5
Merge pull request #246 from humanprotocol/feature/fortune-card-payment
portuu3 Feb 24, 2023
124d724
Fix get_pub_key_from_addr to get value of wallet_addr (#261)
alidzm Feb 27, 2023
b61ed98
fix base models publish (#265)
leric7 Feb 28, 2023
78c0984
update skale configuration and json file
AzizBardi Feb 28, 2023
9035754
update addresses and jsonfile
AzizBardi Feb 28, 2023
7528883
update README
leric7 Feb 28, 2023
725d1fd
minor updates
AzizBardi Mar 1, 2023
e266362
minor updates
AzizBardi Mar 1, 2023
8759549
Adjust sdk syntax code for python less than 3.10 (#270)
alidzm Mar 1, 2023
1e5401d
Merge pull request #269 from humanprotocol/feat/update-readme
ansaqib Mar 1, 2023
e08b706
add skale config in fortune
AzizBardi Mar 1, 2023
878a263
Check if address exist on workers array to avoid duplicate entries (#…
flopez7 Mar 1, 2023
54dc433
minor updates
AzizBardi Mar 1, 2023
94a6e26
minor updates
AzizBardi Mar 1, 2023
e949c00
minor updates
AzizBardi Mar 1, 2023
e4b0e59
minor updates
AzizBardi Mar 1, 2023
d4da50e
update
AzizBardi Mar 1, 2023
77c87f5
Update README.md (#274)
leric7 Mar 2, 2023
9c1e7ae
Change the provider of the fiat section
flopez7 Mar 2, 2023
54d0b0d
Clean logs
flopez7 Mar 2, 2023
86bd008
Merge pull request #276 from humanprotocol/fix/fiatPayments
flopez7 Mar 2, 2023
c3dca18
wagmi config
AzizBardi Mar 4, 2023
82c7feb
minor update
AzizBardi Mar 4, 2023
56d002f
update
AzizBardi Mar 6, 2023
26adee0
use minio for python sdk doctest (#281)
leric7 Mar 6, 2023
9a6d169
Add Skale Config
AzizBardi Feb 22, 2023
87d34a3
update skale configuration and json file
AzizBardi Feb 28, 2023
25f839f
update addresses and jsonfile
AzizBardi Feb 28, 2023
9d8b892
minor updates
AzizBardi Mar 1, 2023
c0590b9
minor updates
AzizBardi Mar 1, 2023
43fc7fc
add skale config in fortune
AzizBardi Mar 1, 2023
71b9f65
minor updates
AzizBardi Mar 1, 2023
c5f2b3a
minor updates
AzizBardi Mar 1, 2023
303d203
minor updates
AzizBardi Mar 1, 2023
83be87e
minor updates
AzizBardi Mar 1, 2023
d208b43
update
AzizBardi Mar 1, 2023
1c84222
wagmi config
AzizBardi Mar 4, 2023
34ccebc
minor update
AzizBardi Mar 4, 2023
5d24339
update
AzizBardi Mar 6, 2023
a7b69b7
Merge branch 'main' of https://github.com/AzizBardi/human-protocol in…
AzizBardi Mar 6, 2023
ac0fabb
update skale configuration and json file
AzizBardi Feb 28, 2023
913ee8c
update addresses and jsonfile
AzizBardi Feb 28, 2023
7d196c0
minor updates
AzizBardi Mar 1, 2023
c649dfa
minor updates
AzizBardi Mar 1, 2023
83c516e
minor updates
AzizBardi Mar 1, 2023
30983ed
minor updates
AzizBardi Mar 1, 2023
76fe590
wagmi config
AzizBardi Mar 4, 2023
dd31bcd
minor update
AzizBardi Mar 4, 2023
6467025
Merge branch 'main' of https://github.com/AzizBardi/human-protocol in…
AzizBardi Mar 6, 2023
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
8 changes: 8 additions & 0 deletions CONTRACTS_LIST.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,14 @@
|2022/10/24 | EthKVStore | 0xd232c1426CF0653cE8a71DC98bCfDf10c471c114 | N/A |
| | Reputation | | |

|🟢 SKALE Human Protocol Chain (Mainnet) | Contract | Address | Proxy |
|----------------------------|----------------|--------------------------------------------|--------------------------------------------|
|2023/01/18 | HMToken | 0xa91B2C7d9704aeE8918460fc4375866e2c415A67 | N/A |
|2023/02/28 | EscrowFactory | 0x6FE287F707cfAd44a135d6d392F5098Dbe09e5FF | 0x27B423cE73d1dBdB48d2dd351398b5Ce8223117c |
|2023/02/28 | Staking | 0x1D9f5Dc3078e9F734E4749f98176C2370516447f | 0xcc98Ad1C0915e271650e43714B20272AC947Ba9A |
|2023/02/28 | RewardPool | 0xca8745D76588C2aa8bA13E8ef14E986b8A74EE3E | 0xEc321ec45dDfBE9049550d461818f4E7759bBE89 |
|2023/02/28 | EthKVStore | 0xb251C9F9276d9EB0B2F4C6a7703AE094e0999BB6 | N/A |
| | Reputation | N/A | N/A |



Expand Down
39 changes: 39 additions & 0 deletions packages/apps/escrow-dashboard/src/constants/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,27 @@ import {
avalanche,
} from 'wagmi/chains';

const wagmiSkaleHP = {
id: 1273227453,
name: 'Skale Human Protocol chain',
network: 'skale',
nativeCurrency: {
decimals: 18,
name: 'Skale FUEL',
symbol: 'sFUEL',
},
rpcUrls: {
public: { http: ['https://mainnet.skalenodes.com/v1/wan-red-ain'] },
default: { http: ['https://mainnet.skalenodes.com/v1/wan-red-ain'] },
},
blockExplorers: {
default: {
name: 'Skale Explorer',
url: 'https://mainnet.skalenodes.com/v1/wan-red-ain',
},
},
} as Chain;

export enum ChainId {
ALL = -1,
MAINNET = 1,
Expand All @@ -24,12 +45,14 @@ export enum ChainId {
MOONBASE_ALPHA = 1287,
AVALANCHE_TESTNET = 43113,
AVALANCHE = 43114,
SKALE = 1273227453,
}

export const HMT_ADDRESSES: { [chainId in ChainId]?: string } = {
[ChainId.MAINNET]: '0xd1ba9BAC957322D6e8c07a160a3A8dA11A0d2867',
[ChainId.POLYGON]: '0xc748b2a084f8efc47e086ccddd9b7e67aeb571bf',
[ChainId.AVALANCHE]: '0x12365293cb6477d4fc2686e46BB97E3Fb64f1550',
[ChainId.SKALE]: '0xa91B2C7d9704aeE8918460fc4375866e2c415A67',
};

export interface IEscrowNetwork {
Expand Down Expand Up @@ -58,6 +81,7 @@ export const SUPPORTED_CHAIN_IDS = [
ChainId.MOONBASE_ALPHA,
ChainId.AVALANCHE_TESTNET,
ChainId.AVALANCHE,
ChainId.SKALE,
];

export const TESTNET_CHAIN_IDS = [
Expand Down Expand Up @@ -216,6 +240,21 @@ export const ESCROW_NETWORKS: {
kvstoreAddress: '0x4B79eaD28F52eD5686bf0e379717e85fc7aD10Df',
wagmiChain: avalanche,
},
[ChainId.SKALE]: {
chainId: ChainId.SKALE,
title: 'SKALE Human Protocol Chain',
scanUrl: 'https://wan-red-ain.explorer.mainnet.skalenodes.com/',
rpcUrl: 'https://mainnet.skalenodes.com/v1/wan-red-ain',
// Subgraph hasn't been implemented yet
subgraphUrl: 'https://api.thegraph.com/',
factoryAddress: '0x27B423cE73d1dBdB48d2dd351398b5Ce8223117c',
hmtAddress: '0xa91B2C7d9704aeE8918460fc4375866e2c415A67',
oldSubgraphUrl: '',
oldFactoryAddress: '0x1cE8d1820D60fF792bd6E59EbFf3C9b1089808c0',
kvstoreAddress: '0xb251C9F9276d9EB0B2F4C6a7703AE094e0999BB6',
// Add custom wagmi
wagmiChain: wagmiSkaleHP,
},
};

export const FAST_INTERVAL = 10_000;
Expand Down
18 changes: 18 additions & 0 deletions packages/core/hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,13 @@ const config: HardhatUserConfig = {
accounts:
process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [],
},

skale: {
chainId: 1273227453,
url: process.env.ETH_SKALE_URL || '',
accounts:
process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [],
},
},
gasReporter: {
enabled: process.env.REPORT_GAS !== undefined,
Expand Down Expand Up @@ -156,7 +163,18 @@ const config: HardhatUserConfig = {
bscTestnet: process.env.BSC_API_KEY || '',
moonbeam: process.env.MOONSCAN_API_KEY || '',
moonbaseAlpha: process.env.MOONSCAN_API_KEY || '',
skale: process.env.SKALE_API_KEY || '',
},
customChains: [
{
network: 'skale',
chainId: 1273227453,
urls: {
apiURL: process.env.SKALE_BROWSER_API_URL || '',
browserURL: process.env.SKALE_BROWSER_URL || '',
},
},
],
},
mocha: {
timeout: 200000,
Expand Down
11 changes: 11 additions & 0 deletions packages/examples/fortune/launcher/client/src/constants/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export enum ChainId {
POLYGON_MUMBAI = 80001,
MOONBEAM = 1284,
LOCALHOST = 1338,
SKALE = 1273227453,
}

export const SUPPORTED_CHAIN_IDS_PRODUCTION = [
Expand All @@ -17,6 +18,7 @@ export const SUPPORTED_CHAIN_IDS_PRODUCTION = [
ChainId.POLYGON,
ChainId.POLYGON_MUMBAI,
ChainId.MOONBEAM,
ChainId.SKALE,
];

export const SUPPORTED_CHAIN_IDS =
Expand Down Expand Up @@ -85,6 +87,15 @@ export const ESCROW_NETWORKS: {
factoryAddress: '0xA8D927C4DA17A6b71675d2D49dFda4E9eBE58f2d',
hmtAddress: '0x0376D26246Eb35FF4F9924cF13E6C05fd0bD7Fb4',
},
// [ChainId.SKALE]: {
// chainId: ChainId.SKALE,
// title: 'SKALE Human Protocol chain',
// scanUrl: 'https://wan-red-ain.explorer.mainnet.skalenodes.com/',
// rpcUrl: 'https://mainnet.skalenodes.com/v1/wan-red-ain',
// subgraphUrl: '',
// factoryAddress: '0x27B423cE73d1dBdB48d2dd351398b5Ce8223117c',
// hmtAddress: '0xa91B2C7d9704aeE8918460fc4375866e2c415A67',
// },
// [ChainId.MOONBEAM]: {
// chainId: ChainId.MOONBEAM,
// title: 'Moonbeam',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export enum ChainId {
MOONBEAM = 1284,
MOONBASE_ALPHA = 1287,
LOCALHOST = 1338,
SKALE = 1273227453,
}

export interface IEscrowNetwork {
Expand Down Expand Up @@ -86,4 +87,11 @@ export const ESCROW_NETWORKS: {
factoryAddress: '0x707fb5A5d36BC15275Af3f73262bf9a1D8C470EB',
hmtAddress: '0xe4C8eC5d057EacF40060b2174627a4941a5c8127',
},
// [ChainId.SKALE]: {
// chainId: ChainId.SKALE,
// title: 'SKALE Human Protocol chain',
// rpcUrl: 'https://mainnet.skalenodes.com/v1/wan-red-ain',
// factoryAddress: '0x27B423cE73d1dBdB48d2dd351398b5Ce8223117c',
// hmtAddress: '0xa91B2C7d9704aeE8918460fc4375866e2c415A67',
// },
};
27 changes: 27 additions & 0 deletions packages/sdk/typescript/subgraph/config/skale.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"network": "skale",
"description": "Human subgraph on SKALE Human Protocol chain",
"EscrowFactory": {
"address": "0x27B423cE73d1dBdB48d2dd351398b5Ce8223117c",
"startBlock": 318931,
"abi": "./node_modules/@human-protocol/core/abis/EscrowFactory.json"
},
"HMToken": {
"address": "0xa91B2C7d9704aeE8918460fc4375866e2c415A67",
"startBlock": 15335,
"abi": "./node_modules/@human-protocol/core/abis/HMToken.json"
},
"Escrow": {
"abi": "./node_modules/@human-protocol/core/abis/Escrow.json"
},
"KVStore": {
"address": "0xb251C9F9276d9EB0B2F4C6a7703AE094e0999BB6",
"startBlock": 29912,
"abi": "./node_modules/@human-protocol/core/abis/KVStore.json"
},
"Staking": {
"address": "0xcc98Ad1C0915e271650e43714B20272AC947Ba9A",
"startBlock": 318929,
"abi": "./node_modules/@human-protocol/core/abis/Staking.json"
}
}