Skip to content

Commit

Permalink
feat: Move types into separate package
Browse files Browse the repository at this point in the history
  • Loading branch information
wsdt committed Mar 8, 2024
1 parent 5a5ec2e commit 83e11e5
Show file tree
Hide file tree
Showing 12 changed files with 30 additions and 398 deletions.
9 changes: 9 additions & 0 deletions hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ const config: HardhatUserConfig & {etherscan: {apiKey: any, customChains: any}}
boba_bnb_mainnet: "boba", // not required, set placeholder
boba_goerli: "boba", // not required, set placeholder
boba_bnb_testnet: "boba", // not required, set placeholder
boba_sepolia: "boba", // not required, set placeholder
},
customChains: [
{
Expand All @@ -127,6 +128,14 @@ const config: HardhatUserConfig & {etherscan: {apiKey: any, customChains: any}}
browserURL: "https://testnet.bobascan.com"
},
},
{
network: "boba_sepolia",
chainId: 28882,
urls: {
apiURL: "https://api.routescan.io/v2/network/testnet/evm/28882/etherscan",
browserURL: "https://testnet.bobascan.com"
},
},
{
network: "boba_bnb_testnet",
chainId: 9728,
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
"dependencies": {
"@aws-sdk/client-kms": "^3.363.0",
"@bobanetwork/core_contracts": "0.5.12",
"@bobanetwork/light-bridge-chains": "^1.0.9",
"@eth-optimism/common-ts": "0.2.2",
"@ethereumjs/common": "^3.2.0",
"@ethereumjs/tx": "4.2.0",
Expand Down
4 changes: 2 additions & 2 deletions src/exec/lightbridge-instance.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { providers } from 'ethers'
import { BobaChains } from '../utils/chains'
import { ENetworkMode, ILightBridgeOpts, SupportedAssets } from '../utils/types'
import { BobaChains } from '@bobanetwork/light-bridge-chains'
import { ENetworkMode, ILightBridgeOpts, SupportedAssets } from '@bobanetwork/light-bridge-chains'
import { LightBridgeService } from '../service'
import { delay } from '../utils/misc.utils'

Expand Down
3 changes: 1 addition & 2 deletions src/exec/run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import * as dotenv from 'dotenv'
import Config from 'bcfg'

/* Imports: Config */
import { BobaChains, IBobaChain } from '../utils/chains'
import { BobaChains, IBobaChain, ChainInfo, ENetworkMode, ILightBridgeOpts } from '@bobanetwork/light-bridge-chains'

/* Imports: Interface */
import { AppDataSource } from '../data-source'
Expand All @@ -12,7 +12,6 @@ import { Init1687802800701 } from '../migrations/1687802800701-00_Init'
import { LastAirdrop } from '../entities/LastAirdrop.entity'
import { LastAirdrop1687802800701 } from '../migrations/1687802800701-01_LastAirdrop'
import { startLightBridgeForNetwork } from './lightbridge-instance'
import { ChainInfo, ENetworkMode, ILightBridgeOpts } from '../utils/types'

dotenv.config()

Expand Down
2 changes: 0 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
export * from './utils/types'
export * from './utils/chains'
export * from './service'
7 changes: 4 additions & 3 deletions src/service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,12 @@ import {
EAirdropSource,
IAirdropConfig,
SupportedAssets,
} from './utils/types'
IKMSSignerConfig,
} from '@bobanetwork/light-bridge-chains'
import { HistoryData } from './entities/HistoryData.entity'
import { historyDataRepository, lastAirdropRepository } from './data-source'
import { IKMSSignerConfig, KMSSigner } from './utils/kms-signing'
import { Asset, BobaChains } from './utils/chains'
import { KMSSigner } from './utils/kms-signing'
import { Asset, BobaChains } from '@bobanetwork/light-bridge-chains'
import { LastAirdrop } from './entities/LastAirdrop.entity'

interface TeleportationOptions {
Expand Down
294 changes: 0 additions & 294 deletions src/utils/chains.ts

This file was deleted.

3 changes: 3 additions & 0 deletions src/utils/graphql.service.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
/*
TODO: Also add to boba-chains npm package
import {
ApolloClient,
DocumentNode,
Expand Down
11 changes: 1 addition & 10 deletions src/utils/kms-signing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,7 @@ import {
PopulatedTransaction,
providers,
} from 'ethers'

export interface IKMSSignerConfig {
awsKmsEndpoint: string
awsKmsRegion: string
awsKmsAccessKey?: string
awsKmsSecretKey?: string
awsKmsKeyId: string
/** @dev Should always be enabled, but can be helpful for debugging and unit tests, .. */
disableDisburserCheck?: boolean
}
import { IKMSSignerConfig } from '@bobanetwork/light-bridge-chains'

export class KMSSigner {
private kmsClient: KMSClient
Expand Down
Loading

0 comments on commit 83e11e5

Please sign in to comment.