Skip to content
This repository has been archived by the owner on Oct 22, 2024. It is now read-only.

Commit

Permalink
BEEFY light client V3 (paritytech#735)
Browse files Browse the repository at this point in the history
  • Loading branch information
vgeddes authored Dec 7, 2022
1 parent ebc3726 commit c2f2eb0
Show file tree
Hide file tree
Showing 42 changed files with 1,592 additions and 1,186 deletions.
7 changes: 6 additions & 1 deletion core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,13 @@
"test": "turbo run test",
"lint": "turbo run lint"
},

"devDependencies": {
"turbo": "^1.6.3"
},
"overrides": {
"@[email protected]>@polkadot/util": "10.1.11",
"@[email protected]>@polkadot/util-crypto": "10.1.11",
"@[email protected]>@polkadot/util": "10.1.11",
"@[email protected]>@polkadot/util-crypto": "10.1.11"
}
}
18 changes: 6 additions & 12 deletions core/packages/contracts/.envrc-example
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,14 @@ export ROPSTEN_PRIVATE_KEY=0x000000000000000000000000000000000000000000000000000
export INFURA_PROJECT_ID=
export ETHERSCAN_API_KEY=

# Basic Channel
export BASIC_CHANNEL_SOURCE_ID=0

# Incentivized Channel
# Default fee is 1 SnowDOT (12 decimal places)
export INCENTIVIZED_CHANNEL_FEE=1000000000000000000
export INCENTIVIZED_CHANNEL_SOURCE_ID=1

# ParachainClient
export PARACHAIN_ID=1000

# For running scripts and tests without hardhat CLI
TS_NODE_FILES=true
export TS_NODE_FILES=true

# Uncomment to enable gas reporting:
#
# export REPORT_GAS=true
#

# Uncomment to enable USD pricing of gas
#
# export COINMARKETCAP_API_KEY=foobar
32 changes: 32 additions & 0 deletions core/packages/contracts/config/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
interface EnvironmentConfig {
basicChannelSourceID: number,
incentivizedChannelSourceID: number,
incentivizedChannelFee: string,
parachainID: number,
randaoCommitDelay: number,
randaoCommitExpiration: number,
}

interface Config {
[network: string]: EnvironmentConfig;
}

const config: Config = {
default: {
basicChannelSourceID: 0,
incentivizedChannelSourceID: 1,
incentivizedChannelFee: "1000000000000000000",
parachainID: 1000,
randaoCommitDelay: 3,
randaoCommitExpiration: 8
}
}

const getConfigForNetwork = (network: string): EnvironmentConfig => {
if (network in config) {
return config[network]
}
return config.default
}

export { getConfigForNetwork }
Loading

0 comments on commit c2f2eb0

Please sign in to comment.