Skip to content

Commit

Permalink
feat(cli,connect): enable OKP4Devnet connect mode
Browse files Browse the repository at this point in the history
- export CW lib from @fadroma/connect
- populate OKP4Devnet in fadroma.ts
  • Loading branch information
egasimus committed Oct 13, 2023
1 parent 5097db0 commit 257df66
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion connect/connect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export * from '@hackbg/conf'

export * from '@fadroma/agent'

export { Scrt }
export { Scrt, CW }

export default function connect <A extends Agent> (
config: Partial<ConnectConfig> = new ConnectConfig()
Expand Down
10 changes: 7 additions & 3 deletions fadroma.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ import { Devnet } from './fadroma-devnet'
import { ProjectWizard, toolVersions } from './fadroma-wizard'

import {
connectModes,
Chain, ChainMode, Scrt, Deployment, DeployStore,
connectModes, Scrt, CW,
Chain, ChainMode, Deployment, DeployStore,
Agent, AnyContract, Contract, Client, DeploymentState, Template,
toInstanceReceipt, timestamp, bold, Console, Error,
bip39, bip39EN
Expand Down Expand Up @@ -91,11 +91,15 @@ export function getDevnet (options: Partial<Config["devnet"]> = {}) {
return new Config({ devnet: options }).getDevnet()
}

// This installs devnet as a selectable chain:
// Installs devnets as selectable chains:
connectModes['ScrtDevnet'] =
(options: Partial<Devnet> = { platform: 'scrt_1.9' }): Scrt.Chain =>
new Config().getDevnet(options).getChain(Scrt.Chain as ChainClass<Scrt.Chain>)

connectModes['OKP4Devnet'] =
(options: Partial<Devnet> = { platform: 'okp4_5.0' }): CW.OKP4.Chain =>
new Config().getDevnet(options).getChain(CW.OKP4.Chain as ChainClass<CW.OKP4.Chain>)

const console = new Console(`@hackbg/fadroma ${version}`)

export default class Project extends CommandContext {
Expand Down

0 comments on commit 257df66

Please sign in to comment.