Skip to content

Commit

Permalink
remove polygon mumbai references
Browse files Browse the repository at this point in the history
  • Loading branch information
kasparkallas committed Apr 30, 2024
1 parent 1cbd4ae commit e35ef3b
Show file tree
Hide file tree
Showing 24 changed files with 32 additions and 72 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/handler.deploy-to-testnets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
strategy:
fail-fast: false
matrix:
network: [eth-sepolia, polygon-mumbai, optimism-sepolia, avalanche-fuji, scroll-sepolia]
network: [eth-sepolia, optimism-sepolia, avalanche-fuji, scroll-sepolia]

steps:
- uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/handler.verify-contracts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
strategy:
fail-fast: false
matrix:
network: [eth-sepolia, polygon-mumbai, optimism-sepolia, avalanche-fuji, polygon-mainnet, xdai-mainnet, optimism-mainnet, arbitrum-one, avalanche-c, bsc-mainnet, eth-mainnet, celo-mainnet, base-mainnnet, scroll-mainnet]
network: [eth-sepolia, optimism-sepolia, avalanche-fuji, polygon-mainnet, xdai-mainnet, optimism-mainnet, arbitrum-one, avalanche-c, bsc-mainnet, eth-mainnet, celo-mainnet, base-mainnnet, scroll-mainnet]

defaults:
run:
Expand Down
2 changes: 0 additions & 2 deletions packages/automation-contracts/autowrap/.env-example
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
# .env-example

MUMBAI_PRIVATE_KEY=
POLYGON_PRIVATE_KEY=
BSC_PRIVATE_KEY=

MUMBAI_URL=
POLYGON_URL=
BSC_URL=

Expand Down
3 changes: 1 addition & 2 deletions packages/automation-contracts/autowrap/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ When your Super Token balance reaches a certain lower threshold, Auto Wrap steps

PRIVATE_KEY=

MUMBAI_PRIVATE_KEY=
POLYGON_PRIVATE_KEY=
BSC_PRIVATE_KEY=

Expand Down Expand Up @@ -58,7 +57,7 @@ npx hardhat addStrategy --manager <manager_address> --strategy <strategy_address
#### Testnets
| | Manager | WrapStrategy |
|----------|--------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------|
| Mumbai | [0x3eAB3c6207F488E475b7955B631B564F0E6317B9](https://mumbai.polygonscan.com/address/0x3eAB3c6207F488E475b7955B631B564F0E6317B9#code) | [0x544728AFDBeEafBeC9e1329031788edb53017bC4](https://mumbai.polygonscan.com/address/0x544728AFDBeEafBeC9e1329031788edb53017bC4#code) |
| OP Sepolia | [0xe567b32C10B0dB72d9490eB1B9A409C5ADed192C](https://sepolia-optimism.etherscan.io/address/0xe567b32C10B0dB72d9490eB1B9A409C5ADed192C) | [0xf232f1fd34CE12e24F4391865c2D6E374D2C34d9](https://sepolia-optimism.etherscan.io/address/0xf232f1fd34CE12e24F4391865c2D6E374D2C34d9) |

#### Mainnets

Expand Down
5 changes: 0 additions & 5 deletions packages/automation-contracts/autowrap/hardhat.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,6 @@ module.exports = {
url: "http://127.0.0.1:8545/",
chainId: 31337,
},
mumbai: {
url: process.env.MUMBAI_URL || "",
accounts:
process.env.MUMBAI_PRIVATE_KEY !== undefined ? [process.env.MUMBAI_PRIVATE_KEY] : [],
},
polygon: {
url: process.env.POLYGON_URL || "",
accounts:
Expand Down
2 changes: 0 additions & 2 deletions packages/automation-contracts/scheduler/.env-example
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
# .env-example

MUMBAI_PRIVATE_KEY=
POLYGON_PRIVATE_KEY=
BSC_PRIVATE_KEY=

MUMBAI_URL=
POLYGON_URL=
BSC_URL=

Expand Down
4 changes: 1 addition & 3 deletions packages/automation-contracts/scheduler/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,9 @@ The Vesting Scheduler allows you to schedule the vesting of tokens to a receiver
```bash
# .env-example

MUMBAI_PRIVATE_KEY=
POLYGON_PRIVATE_KEY=
BSC_PRIVATE_KEY=

MUMBAI_URL=
POLYGON_URL=
BSC_URL=

Expand Down Expand Up @@ -58,7 +56,7 @@ npx hardhat deploy --network <network>
#### Testnets
| | FlowScheduler | VestingScheduler |
|----------|--------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------|
| Mumbai | [0xF18825d412C061aEfEFB4dF46a1c077636dA50bf](https://mumbai.polygonscan.com/address/0xF18825d412C061aEfEFB4dF46a1c077636dA50bf#code) | [0xD4fCe2a08fd2fA7495BEd900F2fb6c6deDBf8632](https://mumbai.polygonscan.com/address/0xD4fCe2a08fd2fA7495BEd900F2fb6c6deDBf8632#code) |
| OP Sepolia | [0x73B1Ce21d03ad389C2A291B1d1dc4DAFE7B5Dc68](https://sepolia-optimism.etherscan.io/address/0x73B1Ce21d03ad389C2A291B1d1dc4DAFE7B5Dc68) | [0x27444c0235a4D921F3106475faeba0B5e7ABDD7a](https://sepolia-optimism.etherscan.io/address/0x27444c0235a4D921F3106475faeba0B5e7ABDD7a) |

#### Mainnets
| | FlowScheduler | VestingScheduler |
Expand Down
5 changes: 0 additions & 5 deletions packages/automation-contracts/scheduler/hardhat.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,6 @@ module.exports = {
url: "http://127.0.0.1:8545/",
chainId: 31337,
},
mumbai: {
url: process.env.MUMBAI_URL || "",
accounts:
process.env.MUMBAI_PRIVATE_KEY !== undefined ? [process.env.MUMBAI_PRIVATE_KEY] : [],
},
polygon: {
url: process.env.POLYGON_URL || "",
accounts:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ library SuperfluidLoaderLibrary {

// testnets
uint256 private constant AVALANCHE_FUJI = 43113;
uint256 private constant POLYGON_MUMBAI = 80001;
uint256 private constant SCROLL_SEPOLIA = 534351;
uint256 private constant ETH_SEPOLIA = 11155111;
uint256 private constant OPTIMISM_SEPOLIA = 11155420;
Expand Down Expand Up @@ -50,8 +49,6 @@ library SuperfluidLoaderLibrary {
// testnets
} else if (block.chainid == AVALANCHE_FUJI) {
return 0x85Fe79b998509B77BF10A8BD4001D58475D29386;
} else if (block.chainid == POLYGON_MUMBAI) {
return 0xEB796bdb90fFA0f28255275e16936D25d3418603;
} else if (block.chainid == SCROLL_SEPOLIA) {
return 0x42b05a6016B9eED232E13fd56a8F0725693DBF8e;
} else if (block.chainid == ETH_SEPOLIA) {
Expand Down
5 changes: 0 additions & 5 deletions packages/ethereum-contracts/hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ const chainIds = {
"arbitrum-one": 42161,

"polygon-mainnet": 137,
"polygon-mumbai": 80001,

"avalanche-c": 43114,
"avalanche-fuji": 43113,
Expand Down Expand Up @@ -127,10 +126,6 @@ const config: HardhatUserConfig = {
...createNetworkConfig("polygon-mainnet"),
url: process.env.POLYGON_MAINNET_PROVIDER_URL || "",
},
"polygon-mumbai": {
...createNetworkConfig("polygon-mumbai"),
url: process.env.POLYGON_MUMBAI_PROVIDER_URL || "",
},
"avalanche-c": {
...createNetworkConfig("avalanche-c"),
url: process.env.AVALANCHE_C_PROVIDER_URL || "",
Expand Down
6 changes: 0 additions & 6 deletions packages/ethereum-contracts/truffle-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ const ALIASES = {
"xdai-mainnet": ["xdai"],

"polygon-mainnet": ["matic"],
"polygon-mumbai": ["mumbai"],

"optimism-mainnet": ["opmainnet"],
"optimism-sepolia": ["opsepolia"],
Expand Down Expand Up @@ -197,11 +196,6 @@ const E = (module.exports = {
maxFeePerGas: 500e9,
},

"polygon-mumbai": {
...createNetworkDefaultConfiguration("polygon-mumbai"),
network_id: 80001,
},


//
// xDAI: https://www.xdaichain.com/for-users/wallets/metamask/metamask-setup
Expand Down
1 change: 0 additions & 1 deletion packages/ethereum-contracts/utils/supertoken-deployer.html
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ <h3 id="loader" style="text-align: center; display: none;">Loading...</h3>

// TODO: replace with external canonical network list
networks = [
{ chainId: 80001, hostAddr: "0xEB796bdb90fFA0f28255275e16936D25d3418603" }, // polygon-mumbai
{ chainId: 43113, hostAddr: "0xf04F2C525819691ed9ABD3D2B7109E1633795e68" }, // avalanche-fuji

{ chainId: 137, hostAddr: "0x3E14dC1b13c488a8d5D310918780c983bD5982E7" }, // polygon-mainnet
Expand Down
20 changes: 10 additions & 10 deletions packages/js-sdk/test/getConfig.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@ describe("getConfig", () => {
delete process.env.RESOLVER_ADDRESS;
});

it("mumbai v1", async () => {
const mumbaiConfig = SuperfluidSDK.getConfig(80001, "v1");
assert.isNotEmpty(mumbaiConfig.resolverAddress);
assert.isNotEmpty(mumbaiConfig.subgraphQueryEndpoint);
assert.isUndefined(mumbaiConfig.versions);
it("polygon v1", async () => {
const config = SuperfluidSDK.getConfig(137, "v1");
assert.isNotEmpty(config.resolverAddress);
assert.isNotEmpty(config.subgraphQueryEndpoint);
assert.isUndefined(config.versions);
});

it("mumbai test", async () => {
const mumbaiConfig = SuperfluidSDK.getConfig(80001, "test");
assert.isNotEmpty(mumbaiConfig.resolverAddress);
assert.isUndefined(mumbaiConfig.subgraphQueryEndpoint);
assert.isUndefined(mumbaiConfig.versions);
it("polygon test", async () => {
const config = SuperfluidSDK.getConfig(137, "test");
assert.isNotEmpty(config.resolverAddress);
assert.isUndefined(config.subgraphQueryEndpoint);
assert.isUndefined(config.versions);
});

it("defaultConfig", async () => {
Expand Down
6 changes: 3 additions & 3 deletions packages/sdk-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@
"generate:graphql-types": "graphql-codegen --config subgraph-codegen.yml",
"generate-graphql-schema": "yarn generate-graphql-schema:v1",
"generate-graphql-schema:local": "get-graphql-schema http://localhost:8000/subgraphs/name/superfluid-test > src/subgraph/schema.graphql",
"generate-graphql-schema:v1": "get-graphql-schema https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-v1-mumbai > src/subgraph/schema.graphql",
"generate-graphql-schema:dev": "get-graphql-schema https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-dev-mumbai > src/subgraph/schema.graphql",
"generate-graphql-schema:feature": "get-graphql-schema https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-feature-mumbai > src/subgraph/schema.graphql",
"generate-graphql-schema:v1": "get-graphql-schema https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-v1-optimism-sepolia > src/subgraph/schema.graphql",
"generate-graphql-schema:dev": "get-graphql-schema https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-dev-optimism-sepolia > src/subgraph/schema.graphql",
"generate-graphql-schema:feature": "get-graphql-schema https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-feature-matic > src/subgraph/schema.graphql",
"cloc": "sh tasks/cloc.sh"
},
"bugs": {
Expand Down
4 changes: 2 additions & 2 deletions packages/sdk-core/previous-versions-testing/queryTests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ import metadata from "@superfluid-finance/metadata";

/**
* We only use matic network endpoints for v1 release tests
* otherwise, we use mumbai
* otherwise, we use OP Sepolia
* @returns chainId
*/
export const getChainId = () => {
// null coalesce, but this should NEVER return null for either
return process.env.SUBGRAPH_RELEASE_TAG == "v1"
? metadata.getNetworkByShortName("matic")?.chainId ?? 0
: metadata.getNetworkByShortName("mumbai")?.chainId ?? 0;
: metadata.getNetworkByShortName("opsepolia")?.chainId ?? 0;
};

export const testQueryClassFunctions = async (query: Query) => {
Expand Down
2 changes: 1 addition & 1 deletion packages/sdk-core/src/subgraph/.graphqlconfig
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"extensions": {
"endpoints": {
"Default GraphQL Endpoint": {
"url": "https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-feature-mumbai",
"url": "https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-dev-optimism-sepolia",
"headers": {
"user-agent": "JS GraphQL"
},
Expand Down
5 changes: 1 addition & 4 deletions packages/sdk-core/tasks/testSchemasAndQueries.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@ JQ="npx --package=node-jq -- jq"
set -xe

if [ "$SUBGRAPH_RELEASE_TAG" == "feature" ];then
# we only support matic and mumbai feature endpoints
# however, we don't want to be blocked by matic for feature
NETWORKS=("mumbai")
NETWORKS=("matic")
fi

if [ "$SUBGRAPH_RELEASE_TAG" == "dev" ] || [ "$SUBGRAPH_RELEASE_TAG" == "v1" ];then
Expand All @@ -31,7 +29,6 @@ for i in "${NETWORKS[@]}";do
declare -A LEGACY_NETWORK_NAMES=(
["xdai-mainnet"]="xdai"
["polygon-mainnet"]="matic"
["polygon-mumbai"]="mumbai"
)

GRAPH_NETWORK="${LEGACY_NETWORK_NAMES[$i]:-$i}"
Expand Down
4 changes: 2 additions & 2 deletions packages/sdk-core/test/0_framework.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ makeSuite("Framework Tests", (testEnv: TestEnvironment) => {
try {
await Framework.create({
// force cast because we know this exists
chainId: networkNameToChainIdMap.get("polygon-mumbai")!,
chainId: networkNameToChainIdMap.get("polygon-mainnet")!,
provider: testEnv.provider,
});
} catch (err: any) {
Expand All @@ -36,7 +36,7 @@ makeSuite("Framework Tests", (testEnv: TestEnvironment) => {
"Network Mismatch Error: Your provider network chainId is: " +
chainId +
" whereas your desired chainId is: " +
networkNameToChainIdMap.get("polygon-mumbai")!
networkNameToChainIdMap.get("polygon-mainnet")!
);
}
});
Expand Down
3 changes: 1 addition & 2 deletions packages/subgraph/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@ MATIC_PROVIDER_URL=
ARBITRUM_ONE_PROVIDER_URL=
AVALANCHE_C_PROVIDER_URL=
BSC_MAINNET_PROVIDER_URL=
AVAFUJI_PROVIDER_URL=
MUMBAI_PROVIDER_URL=
AVAFUJI_PROVIDER_URL=
4 changes: 2 additions & 2 deletions packages/subgraph/scripts/balanceValidation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ import { DataIntegrityAccountTokenSnapshot } from "./dataIntegrity/interfaces";
*/
async function main() {
const endpointA =
"https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-feature-mumbai";
"https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-feature-matic";
const endpointB =
"https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-v1-mumbai";
"https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-v1-matic";
const endpointARecentBlock = await getMostRecentIndexedBlockNumber(
endpointA
);
Expand Down
1 change: 0 additions & 1 deletion packages/subgraph/tasks/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ deploy_to_graph() {
local -A legacyNetworkNames=(
["xdai-mainnet"]="xdai"
["polygon-mainnet"]="matic"
["polygon-mumbai"]="mumbai"
)

local graphNetwork="${legacyNetworkNames[$network]:-$network}"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export const chainIds = [
// 100, // XDAI //TODO(KK): No infura support
137, // MATIC
80001, // MUMBAI
43113 , // OP Sepolia
];

export type Network = {
Expand All @@ -15,8 +15,8 @@ export const networks: Network[] = [
chainId: 137,
},
{
name: "mumbai",
chainId: 80001,
name: "fuji",
chainId: 43113 ,
},
];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,20 @@ import {
} from 'wagmi';
import {
polygon,
polygonMumbai
avalancheFuji
} from 'wagmi/chains'
import { publicProvider } from 'wagmi/providers/public';

export const { chains, provider } = configureChains(
[polygon, polygonMumbai],
[polygon, avalancheFuji],
[
publicProvider()
]
);

export const { connectors } = getDefaultWallets({
appName: 'SDK-redux example',
projectId: "",
chains
});

Expand Down
4 changes: 0 additions & 4 deletions tasks/daily-slack-bot.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,6 @@ const whiteListedAddresses = [
];

const networkSpecificData = {
"polygon-mumbai": {
url: "https://api-testnet.polygonscan.com/api",
key: process.env.POLYGONSCAN_API_KEY,
},
"avalanche-fuji": {
url: "https://api-testnet.snowtrace.io/api",
key: process.env.SNOWTRACE_API_KEY,
Expand Down

0 comments on commit e35ef3b

Please sign in to comment.