diff --git a/packages/hub-contracts/src/HubEnvDeployer.ts b/packages/dev-chain-fast/src/HubEnvDeployer.ts similarity index 98% rename from packages/hub-contracts/src/HubEnvDeployer.ts rename to packages/dev-chain-fast/src/HubEnvDeployer.ts index 067d047ac..5def044b2 100644 --- a/packages/hub-contracts/src/HubEnvDeployer.ts +++ b/packages/dev-chain-fast/src/HubEnvDeployer.ts @@ -1,12 +1,12 @@ -import { ContractFactory, Wallet, providers } from "ethers" import { MarketplaceV4, marketplaceV4ABI, marketplaceV4Bytecode, ProjectRegistryV1, projectRegistryV1ABI, projectRegistryV1Bytecode, + ProjectStakingV1, projectStakingV1ABI, projectStakingV1Bytecode, RemoteMarketplaceV1, remoteMarketplaceV1ABI, remoteMarketplaceV1Bytecode, Uniswap2AdapterV4, uniswap2AdapterV4ABI, uniswap2AdapterV4Bytecode, - ProjectStakingV1, projectStakingV1ABI, projectStakingV1Bytecode, -} from "./exports" +} from "@streamr/hub-contracts" import debug from "debug" +import { ContractFactory, providers, Wallet } from "ethers" const log = debug.log diff --git a/packages/network-contracts/src/StreamrEnvDeployer.ts b/packages/dev-chain-fast/src/StreamrEnvDeployer.ts similarity index 94% rename from packages/network-contracts/src/StreamrEnvDeployer.ts rename to packages/dev-chain-fast/src/StreamrEnvDeployer.ts index 2859add88..6f99519c0 100644 --- a/packages/network-contracts/src/StreamrEnvDeployer.ts +++ b/packages/dev-chain-fast/src/StreamrEnvDeployer.ts @@ -1,30 +1,81 @@ -import { JsonRpcProvider } from "@ethersproject/providers" -import { Wallet } from "@ethersproject/wallet" +import { AddressZero, MaxUint256 } from "@ethersproject/constants" import { Contract, ContractFactory, Event } from "@ethersproject/contracts" -import { parseEther } from "@ethersproject/units" import { namehash } from "@ethersproject/hash" import { keccak256 } from "@ethersproject/keccak256" +import { JsonRpcProvider } from "@ethersproject/providers" import { toUtf8Bytes } from "@ethersproject/strings" -import { AddressZero, MaxUint256 } from "@ethersproject/constants" - -import debug from "debug" +import { parseEther } from "@ethersproject/units" +import { Wallet } from "@ethersproject/wallet" +import type { + DefaultDelegationPolicy, + DefaultExchangeRatePolicy, + DefaultLeavePolicy, + DefaultUndelegationPolicy, + ENSCacheV2, + MaxOperatorsJoinPolicy, + NodeRegistry, + Operator, + OperatorContractOnlyJoinPolicy, + OperatorFactory, + Sponsorship, + SponsorshipFactory, + StakeWeightedAllocationPolicy, + StreamrConfig, + StreamRegistry, + StreamStorageRegistry, + TestToken, + VoteKickPolicy +} from "@streamr/network-contracts" import { - DefaultDelegationPolicy, DefaultLeavePolicy, DefaultExchangeRatePolicy, DefaultUndelegationPolicy, - ENSCacheV2, ENSCacheV2ABI, ENSCacheV2Bytecode, MaxOperatorsJoinPolicy, NodeRegistry, Operator, OperatorContractOnlyJoinPolicy, - OperatorFactory, Sponsorship, SponsorshipFactory, StakeWeightedAllocationPolicy, StreamRegistry, - StreamStorageRegistry, StreamrConfig, TestToken, VoteKickPolicy, defaultDelegationPolicyABI, - defaultDelegationPolicyBytecode, defaultLeavePolicyABI, - defaultLeavePolicyBytecode, defaultExchangeRatePolicyABI, defaultExchangeRatePolicyBytecode, - defaultUndelegationPolicyABI, defaultUndelegationPolicyBytecode, ensRegistryABI, ensRegistryBytecode, - fifsRegistrarABI, fifsRegistrarBytecode, maxOperatorsJoinPolicyABI, - maxOperatorsJoinPolicyBytecode, nodeRegistryABI, nodeRegistryBytecode, - nodeModuleABI, nodeModuleBytecode, operatorABI, operatorBytecode, operatorFactoryABI, - operatorFactoryBytecode, publicResolverABI, publicResolverBytecode, queueModuleABI, queueModuleBytecode, - sponsorshipABI, sponsorshipBytecode, sponsorshipFactoryABI, - sponsorshipFactoryBytecode, stakeModuleABI, stakeModuleBytecode, stakeWeightedAllocationPolicyABI, stakeWeightedAllocationPolicyBytecode, - streamRegistryABI, streamRegistryBytecode, streamStorageRegistryABI, streamStorageRegistryBytecode, streamrConfigABI, streamrConfigBytecode, - tokenABI, tokenBytecode, voteKickPolicyABI, voteKickPolicyBytecode, operatorContractOnlyJoinPolicyABI, operatorContractOnlyJoinPolicyBytecode -} from "./exports" + defaultDelegationPolicyABI, + defaultDelegationPolicyBytecode, + defaultExchangeRatePolicyABI, + defaultExchangeRatePolicyBytecode, + defaultLeavePolicyABI, + defaultLeavePolicyBytecode, + defaultUndelegationPolicyABI, + defaultUndelegationPolicyBytecode, + ENSCacheV2ABI, + ENSCacheV2Bytecode, + ensRegistryABI, + ensRegistryBytecode, + fifsRegistrarABI, + fifsRegistrarBytecode, + maxOperatorsJoinPolicyABI, + maxOperatorsJoinPolicyBytecode, + nodeModuleABI, + nodeModuleBytecode, + nodeRegistryABI, + nodeRegistryBytecode, + operatorABI, + operatorBytecode, + operatorContractOnlyJoinPolicyABI, + operatorContractOnlyJoinPolicyBytecode, + operatorFactoryABI, + operatorFactoryBytecode, + publicResolverABI, + publicResolverBytecode, + queueModuleABI, + queueModuleBytecode, + sponsorshipABI, + sponsorshipBytecode, + sponsorshipFactoryABI, + sponsorshipFactoryBytecode, + stakeModuleABI, + stakeModuleBytecode, + stakeWeightedAllocationPolicyABI, + stakeWeightedAllocationPolicyBytecode, + streamrConfigABI, + streamrConfigBytecode, + streamRegistryABI, + streamRegistryBytecode, + streamStorageRegistryABI, + streamStorageRegistryBytecode, + tokenABI, + tokenBytecode, + voteKickPolicyABI, voteKickPolicyBytecode +} from "@streamr/network-contracts" +import debug from "debug" const VOTE_KICK = "0x0000000000000000000000000000000000000000000000000000000000000001" diff --git a/packages/dev-chain-fast/src/deploy.ts b/packages/dev-chain-fast/src/deploy.ts index a8b569c80..c90113b47 100644 --- a/packages/dev-chain-fast/src/deploy.ts +++ b/packages/dev-chain-fast/src/deploy.ts @@ -1,11 +1,9 @@ /* eslint-disable no-console */ -import { StreamrEnvDeployer } from "@streamr/network-contracts" -import { HubEnvDeployer } from "@streamr/hub-contracts" - import { JsonRpcProvider } from "@ethersproject/providers" import { Wallet } from "@ethersproject/wallet" - +import { HubEnvDeployer } from "./HubEnvDeployer" import { projects } from "./projects" +import { StreamrEnvDeployer } from "./StreamrEnvDeployer" // hardhat node mockchain (first private key from testrpc mnemonic) const key = "0x5e98cce00cff5dea6b454889f359a4ec06b9fa6b88e9d69b86de8e1c81887da0" diff --git a/packages/hub-contracts/src/exports.ts b/packages/hub-contracts/src/exports.ts index d8b9065db..82a8a4389 100644 --- a/packages/hub-contracts/src/exports.ts +++ b/packages/hub-contracts/src/exports.ts @@ -17,5 +17,3 @@ export type { Uniswap2AdapterV4 } from "../typechain/contracts/Marketplace/Unisw export { abi as remoteMarketplaceV1ABI, bytecode as remoteMarketplaceV1Bytecode } from "../artifacts/contracts/Marketplace/RemoteMarketplaceV1.sol/RemoteMarketplaceV1.json" export type { RemoteMarketplaceV1 } from "../typechain/contracts/Marketplace/RemoteMarketplaceV1" - -export * from "./HubEnvDeployer" diff --git a/packages/network-contracts/src/exports.ts b/packages/network-contracts/src/exports.ts index 7308eb5b7..e83ae9fc1 100644 --- a/packages/network-contracts/src/exports.ts +++ b/packages/network-contracts/src/exports.ts @@ -147,5 +147,3 @@ export const publicResolverCodehash = keccak256(publicResolverBytecode) export const nodeModuleCodehash = keccak256(nodeModuleBytecode) export const queueModuleCodehash = keccak256(queueModuleBytecode) export const stakeModuleCodehash = keccak256(stakeModuleBytecode) - -export * from "./StreamrEnvDeployer"