Skip to content

Commit

Permalink
lint & rename changes
Browse files Browse the repository at this point in the history
  • Loading branch information
nemani committed Aug 23, 2023
1 parent 54b60cf commit 66ab452
Show file tree
Hide file tree
Showing 15 changed files with 2,573 additions and 14,036 deletions.
4 changes: 2 additions & 2 deletions deployment/deployment.json
Original file line number Diff line number Diff line change
Expand Up @@ -7522,7 +7522,7 @@
}
},
"files": {
"template": "polygon-root.template.yaml"
"template": "polygon.mainnet.template.yaml"
},
"options": {
"prepare:yaml": true,
Expand All @@ -7544,7 +7544,7 @@
}
},
"files": {
"template": "polygon-child.template.yaml"
"template": "polygon.polygon.template.yaml"
},
"options": {
"prepare:yaml": true,
Expand Down
16,555 changes: 2,555 additions & 14,000 deletions package-lock.json

Large diffs are not rendered by default.

3 changes: 0 additions & 3 deletions subgraphs/polygon-bridge/.gitignore

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { Address } from "@graphprotocol/graph-ts";
import { Configurations } from "../../../../../configurations/configurations/interface";
import {
PROTOCOL_NAME,
Expand All @@ -17,7 +16,7 @@ export class PolygonMainnetConfigurations implements Configurations {
return PROTOCOL_SLUG;
}
getFactoryAddress(): string {
return "0xA0c68C638235ee32657e8f720a23ceC1bFc77C77";
return "0xa0c68c638235ee32657e8f720a23cec1bfc77c77";
}
getRewardToken(): string {
return "";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export class PolygonMaticConfigurations implements Configurations {
return PROTOCOL_SLUG;
}
getFactoryAddress(): string {
return "0x808d7c71ad2ba3FA531b068a2417C63106BC0949";
return "0x808d7c71ad2ba3fa531b068a2417c63106bc0949";
}
getRewardToken(): string {
return "";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ dataSources:
handler: handlePredicateRegistered
- event: TokenMapped(indexed address,indexed address,indexed bytes32)
handler: handlePOSTokenMapped
file: ./src/mappings/rootchain-manager.ts
file: ./src/mappings/rootchainManager.ts

- kind: ethereum/contract
name: FxERC20Events
Expand Down Expand Up @@ -179,7 +179,7 @@ dataSources:
handler: handleFxWithdrawERC20
- event: TokenMappedERC20(indexed address,indexed address)
handler: handleTokenMappedERC20
file: ./src/mappings/fx-erc20.ts
file: ./src/mappings/fxErc20.ts

templates:
- name: Predicate
Expand Down
2 changes: 1 addition & 1 deletion subgraphs/polygon-bridge/src/common/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ export const crossPoolTokens = new TypedMap<
TypedMap<BigInt, Address>
>();

export const posDecoderAddress = "0x13E301F8d9563e3D8d48F1d21aE8110B22558cd5";
export const posDecoderAddress = "0x13e301f8d9563e3d8d48f1d21ae8110b22558cd5";
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,7 @@ import { getUsdPricePerToken, getUsdPrice } from "../prices";
import { Versions } from "../versions";
import { ERC20 } from "../../generated/FxERC20Events/ERC20";
import { RootChainManager } from "../../generated/FxERC20Events/RootChainManager";
import {
BIGDECIMAL_ZERO,
UNKNOWN_TOKEN_VALUE,
} from "../prices/common/constants";
import { UNKNOWN_TOKEN_VALUE } from "../prices/common/constants";
import { ETH_ADDRESS } from "../sdk/util/constants";

export const conf = new BridgeConfig(
Expand Down
14 changes: 2 additions & 12 deletions subgraphs/polygon-bridge/src/mappings/predicate.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,9 @@
import {
Address,
BigDecimal,
BigInt,
Bytes,
ethereum,
log,
} from "@graphprotocol/graph-ts";

import { Token } from "../../generated/schema";
import { Address, BigInt, Bytes, ethereum, log } from "@graphprotocol/graph-ts";

import {
ExitTokensCall,
LockTokensCall,
} from "../../generated/FxERC20Events/ERC20Predicate";
import { NetworkConfigs } from "../../configurations/configure";

import { SDK } from "../sdk/protocols/bridge";
import {
Expand All @@ -22,7 +12,7 @@ import {
} from "../sdk/protocols/bridge/enums";
import { RootChainManager } from "../../generated/FxERC20Events/RootChainManager";
import { UNKNOWN_TOKEN_VALUE } from "../prices/common/constants";
import { conf, Pricer, TokenInit } from "./fx-erc20";
import { conf, Pricer, TokenInit } from "./fxErc20";

export function handleLockTokens(call: LockTokensCall): void {
// poolAddress == RootToken Address
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
BridgePoolType,
CrosschainTokenType,
} from "../sdk/protocols/bridge/enums";
import { conf, Pricer, TokenInit } from "./fx-erc20";
import { conf, Pricer, TokenInit } from "./fxErc20";
import { Predicate as PredicateTemplate } from "../../generated/templates";
import { UNKNOWN_TOKEN_VALUE } from "../prices/common/constants";

Expand Down
12 changes: 6 additions & 6 deletions subgraphs/polygon-bridge/src/prices/config/mainnet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,14 +99,14 @@ export const HARDCODED_STABLES: Address[] = [

export const IGNORELIST: Address[] = [
Address.fromString("0xea6b6a4b813d1436a75883fcc789121e4b3f0465"),
Address.fromString("0x761D38e5ddf6ccf6Cf7c55759d5210750B5D60F3"),
Address.fromString("0x761d38e5ddf6ccf6cf7c55759d5210750b5d60f3"),
Address.fromString("0xfad45e47083e4607302aa43c65fb3106f1cd7607"),
Address.fromString("0x9d3ee6b64e69ebe12a4bf0b01d031cb80f556ee4"),
Address.fromString("0x922ac473a3cc241fd3a0049ed14536452d58d73c"),
Address.fromString("0xCae72A7A0Fd9046cf6b165CA54c9e3a3872109E0"),
Address.fromString("0xcae72a7a0fd9046cf6b165ca54c9e3a3872109e0"),
Address.fromString("0x9695e0114e12c0d3a3636fab5a18e6b737529023"),
Address.fromString("0xcc4ae94372da236e9b113132e0c46c68704246b9"),
Address.fromString("0x676CdC3312d0350749bed17CD3eB3B90E5917F42"),
Address.fromString("0x676cdc3312d0350749bed17cd3eb3b90e5917f42"),
Address.fromString("0x591975253e25101f6e6f0383e13e82b7601d8c59"),
Address.fromString("0x7b6bbbeac6a7f5681ec8e250b9aeb45a42bdc2cf"),
Address.fromString("0xe17093967e43d37ad615a64cb86ae11826d6e58b"),
Expand All @@ -123,9 +123,9 @@ export const IGNORELIST: Address[] = [
Address.fromString("0xbca3c97837a39099ec3082df97e28ce91be14472"),
Address.fromString("0x9783b81438c24848f85848f8df31845097341771"),
Address.fromString("0x4e08f03079c5cd3083ea331ec61bcc87538b7665"),
Address.fromString("0x09617F6fD6cF8A71278ec86e23bBab29C04353a7"),
Address.fromString("0xFD957F21bd95E723645C07C48a2d8ACB8Ffb3794"),
Address.fromString("0x5AA7C403c7dE4B3bb0cc07079a03e389671a4771"),
Address.fromString("0x09617f6fd6cf8a71278ec86e23bbab29c04353a7"),
Address.fromString("0xfd957f21bd95e723645c07c48a2d8acb8ffb3794"),
Address.fromString("0x5aa7c403c7de4b3bb0cc07079a03e389671a4771"),
Address.fromString("0x31903e333809897ee57af57567f4377a1a78756c"),
];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import {
import { chainIDToNetwork } from "./chainIds";
import { Bridge } from "./protocol";
import { RewardTokenType } from "../../util/constants";
import { NetworkConfigs } from "../../../../configurations/configure";

export interface TokenInitializer {
getTokenParams(address: Address): TokenParams;
Expand Down
2 changes: 1 addition & 1 deletion subgraphs/polygon-bridge/src/sdk/util/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ export namespace UsageType {
//////////////////////////////

export const ZERO_ADDRESS = "0x0000000000000000000000000000000000000000";
export const ETH_ADDRESS = "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE";
export const ETH_ADDRESS = "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee";

////////////////////////
///// Type Helpers /////
Expand Down

0 comments on commit 66ab452

Please sign in to comment.