Skip to content
This repository has been archived by the owner on Sep 14, 2023. It is now read-only.

Commit

Permalink
more cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
harrysolovay committed May 1, 2023
1 parent e2e2a76 commit 135008c
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 14 deletions.
4 changes: 1 addition & 3 deletions nets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,4 @@ export const rococoDevXcmStatemine = rococoDevXcm.parachain(
)
export const rococoDevXcmTrappist = rococoDevXcm.parachain(bin.trappist, "local", 2000)

export const polkadotFromMetadata = net.metadata(
await Deno.readFile("examples/raw_rpc/metadata"),
)
export const polkadotFromMetadata = net.metadata(await Deno.readFile("examples/raw_rpc/metadata"))
6 changes: 3 additions & 3 deletions nets/Parachain.ts → nets/DevParachain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ import {
import { addDevUsers } from "./common/dev_users.ts"
import { spawnDevNet, SpawnDevNetResult } from "./common/spawnDevNet.ts"
import { BinaryGetter, DevNet } from "./DevNet.ts"
import { RelayChain } from "./RelayChain.ts"
import { DevRelayChain } from "./DevRelayChain.ts"

export class Parachain extends DevNet {
export class DevParachain extends DevNet {
constructor(
readonly relayChain: RelayChain,
readonly relayChain: DevRelayChain,
binary: BinaryGetter,
chain: string,
readonly id: number,
Expand Down
8 changes: 4 additions & 4 deletions nets/RelayChain.ts → nets/DevRelayChain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ import {
import { addDevUsers } from "./common/dev_users.ts"
import { spawnDevNet, SpawnDevNetResult } from "./common/spawnDevNet.ts"
import { BinaryGetter, DevNet } from "./DevNet.ts"
import { Parachain, ParachainInfo } from "./Parachain.ts"
import { DevParachain, ParachainInfo } from "./DevParachain.ts"

export class RelayChain extends DevNet {
parachains: Parachain[] = []
export class DevRelayChain extends DevNet {
parachains: DevParachain[] = []

parachain(binary: BinaryGetter, chain: string, id: number, nodes?: number) {
return new Parachain(this, binary, chain, id, nodes)
return new DevParachain(this, binary, chain, id, nodes)
}

preflightNetworkArgs() {
Expand Down
8 changes: 4 additions & 4 deletions nets/mod.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { BinaryGetter } from "./DevNet.ts"
import { DevRelayChain } from "./DevRelayChain.ts"
import { MetadataNet } from "./MetadataNet.ts"
import { RelayChain } from "./RelayChain.ts"
import { WsNet } from "./WsNet.ts"

export namespace net {
Expand All @@ -13,16 +13,16 @@ export namespace net {
}

export function dev(binary: BinaryGetter, chain: string, nodeCount?: number) {
return new RelayChain(binary, chain, nodeCount)
return new DevRelayChain(binary, chain, nodeCount)
}
}

// moderate

export * from "./common/mod.ts"
export * from "./DevNet.ts"
export * from "./DevParachain.ts"
export * from "./DevRelayChain.ts"
export * from "./MetadataNet.ts"
export * from "./Net.ts"
export * from "./Parachain.ts"
export * from "./RelayChain.ts"
export * from "./WsNet.ts"
1 change: 1 addition & 0 deletions util/mod.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// moderate --exclude autobin cache port.ts proxyWebSocket.ts tempDir.ts tsFormatter.ts

export * from "./ArrayOfLength.ts"
export * from "./autobin.ts"
export * from "./clock.ts"
export * from "./compression.ts"
export * from "./error.ts"
Expand Down

0 comments on commit 135008c

Please sign in to comment.