Skip to content

Commit

Permalink
Add Matic and Mumbai support (#37)
Browse files Browse the repository at this point in the history
  • Loading branch information
stanislaw-glogowski authored Apr 12, 2021
1 parent 5e39b92 commit 37e9fe8
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 7 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2020 Pillar Project
Copyright (c) 2021 Pillar Project

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "etherspot",
"version": "1.2.1",
"version": "1.2.2",
"description": "Etherspot SDK",
"keywords": [
"ether",
Expand Down Expand Up @@ -41,7 +41,7 @@
},
"dependencies": {
"@apollo/client": "3.3.11",
"@etherspot/contracts": "1.2.0",
"@etherspot/contracts": "1.2.1",
"class-transformer": "0.4.0",
"class-validator": "0.13.1",
"cross-fetch": "3.0.6",
Expand Down
21 changes: 21 additions & 0 deletions schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@ type Mutation {
type Network {
chainId: Int!
name: NetworkNames!
nativeCurrency: NetworkNativeCurrencies!
}

type Notification {
Expand Down Expand Up @@ -559,6 +560,26 @@ enum NetworkNames {
LocalA
LocalB
Mainnet
Matic
Mumbai
Rinkeby
Ropsten
Sokol
Xdai
}

enum NetworkNativeCurrencies {
Bsc
BscTest
Fantom
FantomTest
Goerli
Kovan
LocalA
LocalB
Mainnet
Matic
Mumbai
Rinkeby
Ropsten
Sokol
Expand Down
2 changes: 2 additions & 0 deletions src/sdk/env/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export const SUPPORTED_ENVS: { [key: string]: Env } = {
NetworkNames.Xdai,
NetworkNames.Bsc,
NetworkNames.Fantom,
NetworkNames.Matic,
],
},
},
Expand All @@ -36,6 +37,7 @@ export const SUPPORTED_ENVS: { [key: string]: Env } = {
NetworkNames.Sokol,
NetworkNames.BscTest,
NetworkNames.FantomTest,
NetworkNames.Mumbai,
],
},
},
Expand Down
4 changes: 4 additions & 0 deletions src/sdk/network/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ export enum NetworkNames {
BscTest = 'bscTest',
Fantom = 'fantom',
FantomTest = 'fantomTest',
Matic = 'matic',
Mumbai = 'mumbai',
LocalA = 'localA',
LocalB = 'localB',
}
Expand All @@ -28,6 +30,8 @@ export const NETWORK_NAME_TO_CHAIN_ID: {
[NetworkNames.BscTest]: 97,
[NetworkNames.Fantom]: 250,
[NetworkNames.FantomTest]: 4002,
[NetworkNames.Matic]: 137,
[NetworkNames.Mumbai]: 80001,
[NetworkNames.LocalA]: 9999,
[NetworkNames.LocalB]: 6666,
};
Expand Down

0 comments on commit 37e9fe8

Please sign in to comment.