Skip to content

Commit

Permalink
Merge branch 'master' into xiaoch05-lnv3
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoch05 committed Jan 23, 2024
2 parents 864f2ad + ec0e332 commit 1f26e8a
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 93 deletions.
25 changes: 10 additions & 15 deletions apollo/.env.prod
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,26 @@ S2S_BACKING=https://thegraph.darwinia.network/helix/subgraphs/name/s2sbacking
S2S_ISSUING=https://thegraph.darwinia.network/helix/subgraphs/name/s2sissuing

SUB2ETH_BACKING=https://thegraph.darwinia.network/helix/subgraphs/name/sub2ethbacking/darwinia
SUB2ETH_ISSUING=https://thegraph.darwinia.network/helix/subgraphs/name/sub2ethissuing/ethereum
SUB2ETH_INBOUND=https://thegraph.darwinia.network/helix/subgraphs/name/sub2ethinboundLane
SUB2ETH_ISSUING=https://api.studio.thegraph.com/query/8943/xtokenv1-issuing-ethereum/v1.0.0
SUB2ETH_INBOUND_DARWINIA=https://thegraph.darwinia.network/helix/subgraphs/name/sub2ethinboundLane/darwinia
SUB2ETH_INBOUND_ETHEREUM=https://api.studio.thegraph.com/query/8943/xtokenv1-dispatch-ethereum/v1.0.0

DARWINIA_S2E_LN_ENDPOINT=https://thegraph.darwinia.network/helix/subgraphs/name/sub2ethln/darwinia
ETHEREUM_S2E_LN_ENDPOINT=https://thegraph.darwinia.network/helix/subgraphs/name/sub2ethln/ethereum
ETHEREUM_S2E_LN_ENDPOINT=https://api.studio.thegraph.com/query/8943/lnv1-ethereum/v1.0.0

L2_ETHEREUM_URL=https://thegraph.darwinia.network/helix/subgraphs/name/l2arbitrum/ethereum
L2_ARBITRUM_URL=https://thegraph.darwinia.network/helix/subgraphs/name/l2arbitrum/arbitrum

ETHEREUM_A2E_LNV2_ENDPOINT=https://thegraph-g1.darwinia.network/helix/subgraphs/name/lnv2target/ethereum
ARBITRUM_A2E_LNV2_ENDPOINT=https://thegraph-g1.darwinia.network/helix/subgraphs/name/lnv2source/arbitrum

LN_ETHEREUM_OPPOSITE_ENDPOINT=https://api.studio.thegraph.com/query/59403/lnopposite-ethereum/version/latest
LN_ARBITRUM_OPPOSITE_ENDPOINT=https://api.studio.thegraph.com/query/59403/lnopposite-arbitrum/version/latest
LN_ETHEREUM_DEFAULT_ENDPOINT=https://api.studio.thegraph.com/query/59403/lndefault-ethereum/version/latest
LN_ARBITRUM_DEFAULT_ENDPOINT=https://api.studio.thegraph.com/query/59403/lndefault-arbitrum/version/latest
LN_ETHEREUM_OPPOSITE_ENDPOINT=https://api.studio.thegraph.com/query/59403/lnopposite-ethereum/v2.0.0
LN_ARBITRUM_OPPOSITE_ENDPOINT=https://api.studio.thegraph.com/query/59403/lnopposite-arbitrum/v2.0.0
LN_ETHEREUM_DEFAULT_ENDPOINT=https://api.studio.thegraph.com/query/59403/lndefault-ethereum/v2.0.0
LN_ARBITRUM_DEFAULT_ENDPOINT=https://api.studio.thegraph.com/query/59403/lndefault-arbitrum/v2.0.0
LN_MANTLE_DEFAULT_ENDPOINT=https://thegraph-g1.darwinia.network/helix/subgraphs/name/lndefault/mantle
LN_POLYGON_DEFAULT_ENDPOINT=https://api.studio.thegraph.com/query/59403/lndefault-polygon/version/latest
LN_POLYGON_DEFAULT_ENDPOINT=https://api.studio.thegraph.com/query/59403/lndefault-polygon/v2.0.0
LN_ZKSYNC_DEFAULT_ENDPOINT=https://api.studio.thegraph.com/query/59403/lndefault-zksync/version/latest
LN_SCROLL_DEFAULT_ENDPOINT=https://api.studio.thegraph.com/query/59403/lndefault-scroll/version/latest
LN_DARWINIA_DEFAULT_ENDPOINT=https://thegraph-g1.darwinia.network/helix/subgraphs/name/lndefault/darwinia
LN_CRAB_DEFAULT_ENDPOINT=https://thegraph-g1.darwinia.network/helix/subgraphs/name/lndefault/crab
LN_BSC_DEFAULT_ENDPOINT=https://api.thegraph.com/subgraphs/name/helix-bridge/lndefault-bsc
LN_BASE_DEFAULT_ENDPOINT=https://api.studio.thegraph.com/query/59403/lndefault-base/version/latest
LN_OP_DEFAULT_ENDPOINT=https://api.studio.thegraph.com/query/59403/lndefault-optimism/version/latest
LN_OP_DEFAULT_ENDPOINT=https://api.studio.thegraph.com/query/59403/lndefault-optimism/v2.0.0
LN_LINEA_DEFAULT_ENDPOINT=https://thegraph-g1.darwinia.network/helix/subgraphs/name/lndefault/linea

CHAIN_TYPE=formal
2 changes: 0 additions & 2 deletions apollo/src/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import { XcmModule } from './xcm/xcm.module';
import { Sub2ethv2Module } from './sub2ethv2/sub2ethv2.module';
import { S2sv21Module } from './s2sv21/s2sv21.module';
import { LnbridgeModule } from './lnbridge/lnbridge.module';
import { L2arbitrumModule } from './l2arbitrum/l2arbitrum.module';
import { Lnbridgev20Module } from './lnbridgev20/lnbridgev20.module';
import { Lnv3Module } from './lnv3/lnv3.module';

Expand Down Expand Up @@ -47,7 +46,6 @@ export class BigIntScalar extends BigInt {}
Sub2ethv2Module,
LnbridgeModule,
S2sv21Module,
L2arbitrumModule,
Lnbridgev20Module,
Lnv3Module,
],
Expand Down
4 changes: 0 additions & 4 deletions apollo/src/lnbridge/transfer.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@ export class TransferService extends BaseTransferServiceT2 {
private readonly darwiniaSub2EthLnEndpoint = this.configService.get<string>(
'DARWINIA_S2E_LN_ENDPOINT'
);
private readonly goerliArb2EthEndpoint = this.configService.get<string>('GOERLI_A2E_LN_ENDPOINT');
private readonly arbitrumArb2EthEndpoint = this.configService.get<string>(
'ARBITRUM_A2E_LN_ENDPOINT'
);

formalChainTransfers: PartnerT2[] = [
/*
Expand Down
72 changes: 5 additions & 67 deletions apollo/src/sub2ethv2/transfer.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ import { BaseTransferServiceT1, TransferT1 } from '../base/TransferServiceT1';
export class TransferService extends BaseTransferServiceT1 {
private readonly backingSubgraphUrl = this.configService.get<string>('SUB2ETH_BACKING');
private readonly issuingSubgraphUrl = this.configService.get<string>('SUB2ETH_ISSUING');
private readonly inboundLaneSubgraph = this.configService.get<string>('SUB2ETH_INBOUND');
private readonly inboundLaneDarwiniaSubgraph = this.configService.get<string>('SUB2ETH_INBOUND_DARWINIA');
private readonly inboundLaneEthereumSubgraph = this.configService.get<string>('SUB2ETH_INBOUND_ETHEREUM');

formalChainTransfers: TransferT1[] = [
{
Expand Down Expand Up @@ -71,74 +72,11 @@ export class TransferService extends BaseTransferServiceT1 {
},
];

testChainTransfers: TransferT1[] = [
{
source: {
chain: 'pangolin-dvm',
url: this.backingSubgraphUrl,
feeToken: 'PRING',
},
target: {
chain: 'goerli',
url: this.issuingSubgraphUrl,
feeToken: 'GoerliETH',
},
isLock: true,
bridge: 'pangolin2goerli',
symbols: [
{
from: 'WPRING',
to: 'PRING',
address: '0x3f3edbda6124462a09e071c5d90e072e0d5d4ed4',
toAddress: '0xeb93165e3cdb354c977a182abf4fad3238e04319',
protocolFee: 0,
},
{
from: 'OKTON',
to: 'OKTON',
address: '0x0000000000000000000000000000000000000402',
toAddress: '0xdd3df59c868fcd40fded7af0cccc3e2c7bcb4f3c',
protocolFee: 0,
},
],
},
{
source: {
chain: 'goerli',
url: this.issuingSubgraphUrl,
feeToken: 'GoerliETH',
},
target: {
chain: 'pangolin-dvm',
url: this.backingSubgraphUrl,
feeToken: 'PRING',
},
isLock: false,
bridge: 'goerli2pangolin',
symbols: [
{
from: 'PRING',
to: 'WPRING',
address: '0xeb93165e3cdb354c977a182abf4fad3238e04319',
toAddress: '0x3f3edbda6124462a09e071c5d90e072e0d5d4ed4',
protocolFee: 0,
},
{
from: 'OKTON',
to: 'OKTON',
address: '0xdd3df59c868fcd40fded7af0cccc3e2c7bcb4f3c',
toAddress: '0x0000000000000000000000000000000000000402',
protocolFee: 0,
},
],
},
];
testChainTransfers: TransferT1[] = [];

dispatchEndPoints = {
pangolin: this.inboundLaneSubgraph + '/pangolin',
goerli: this.inboundLaneSubgraph + '/goerli',
darwinia: this.inboundLaneSubgraph + '/darwinia',
ethereum: this.inboundLaneSubgraph + '/ethereum',
darwinia: this.inboundLaneDarwiniaSubgraph,
ethereum: this.inboundLaneEthereumSubgraph,
};

constructor(public configService: ConfigService) {
Expand Down
2 changes: 1 addition & 1 deletion subgraph/ln-bridge/subgraph.yaml.d2eethereum
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ schema:
dataSources:
- kind: ethereum/contract
name: LpBridge
network: ethereum
network: mainnet
source:
address: "0x5F8D4232367759bCe5d9488D3ade77FCFF6B9b6B"
abi: LpBridge
Expand Down
2 changes: 1 addition & 1 deletion subgraph/ln-default-bridge/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"build-crab": "sh generate.sh crab2 0x94C614DAeFDbf151E1BB53d6A201ae5fF56A9337 1718910 && graph codegen && graph build",
"build-bsc": "sh generate.sh bsc 0x94C614DAeFDbf151E1BB53d6A201ae5fF56A9337 33646764 && graph codegen && graph build",
"build-base": "sh generate.sh base 0x94C614DAeFDbf151E1BB53d6A201ae5fF56A9337 6837827 && graph codegen && graph build",
"build-op": "sh generate.sh op 0x94C614DAeFDbf151E1BB53d6A201ae5fF56A9337 112469188 && graph codegen && graph build",
"build-op": "sh generate.sh optimism 0x94C614DAeFDbf151E1BB53d6A201ae5fF56A9337 112469188 && graph codegen && graph build",
"build-linea": "sh generate.sh linea 0x94C614DAeFDbf151E1BB53d6A201ae5fF56A9337 927064 && graph codegen && graph build",
"create-remote-dev": "graph create --access-token ${KEY} --node https://thegraph-g2.darwinia.network/helix/deploy/ lndefault/${NETWORK}",
"deploy-remote-dev": "graph deploy --access-token $KEY --node https://thegraph-g2.darwinia.network/helix/deploy/ --ipfs https://ipfs.network.thegraph.com lndefault/$NETWORK",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ schema:
dataSources:
- kind: ethereum/contract
name: Erc20Sub2EthMappingTokenFactory
network: ethereum
network: mainnet
source:
address: "0xFBAD806Bdf9cEC2943be281FB355Da05068DE925"
abi: Erc20Sub2EthMappingTokenFactory
Expand Down
4 changes: 2 additions & 2 deletions subgraph/sub2eth/messageDispatcher/subgraph.yaml.ethereum
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ schema:
dataSources:
- kind: ethereum/contract
name: InboundLane
network: ethereum
network: mainnet
source:
address: "0x9bd2F907B33E25126CD4e4342a75dE8F8eff76Bf"
abi: InboundLane
Expand All @@ -24,7 +24,7 @@ dataSources:
file: ./src/claimable.ts
- kind: ethereum/contract
name: Guard
network: ethereum
network: mainnet
source:
address: "0x61B6B8c7C00aA7F060a2BEDeE6b11927CC9c3eF1"
abi: Guard
Expand Down

0 comments on commit 1f26e8a

Please sign in to comment.