Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release #1717

Merged
merged 3 commits into from
May 10, 2024
Merged

Release #1717

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changeset/yellow-cups-smoke.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@sphinx-labs/plugins': patch
'@sphinx-labs/core': patch
---

Rollback internal hardhat sim change
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
command: sh ./scripts/create-placeholder.sh
- run:
name: Install dependencies
command: yarn --frozen-lockfile --network-concurrency 1
command: yarn --frozen-lockfile --link-duplicates --network-concurrency 1
- save_cache:
key: v2-cache-yarn-install-{{ checksum "yarn.lock" }}
paths:
Expand Down
3 changes: 1 addition & 2 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,7 @@
"semver": "^7.3.8",
"solidity-ast": "^0.4.45",
"undici": "^5.21.1",
"yesno": "^0.4.0",
"debug": "^4.3.4"
"yesno": "^0.4.0"
},
"devDependencies": {
"@types/sinon": "^17.0.2",
Expand Down
10 changes: 6 additions & 4 deletions packages/core/src/actions/execute.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Logger } from '@eth-optimism/common-ts'
import { HardhatEthersProvider } from '@nomicfoundation/hardhat-ethers/internal/hardhat-ethers-provider'
import {
SphinxLeafWithProof,
ManagedServiceABI,
Expand All @@ -25,7 +26,7 @@ import {
MerkleRootStatus,
} from './types'
import { ExecutionMode } from '../constants'
import { InProcessEthersProvider, SphinxJsonRpcProvider } from '../provider'
import { SphinxJsonRpcProvider } from '../provider'
import {
addSphinxWalletsToGnosisSafeOwners,
findLeafWithProof,
Expand Down Expand Up @@ -253,7 +254,7 @@ export type DeploymentContext = {
*
* Allows us to generate and supply the rpc provider in whatever way we would like.
*/
provider: SphinxJsonRpcProvider | InProcessEthersProvider
provider: SphinxJsonRpcProvider | HardhatEthersProvider

/**
* An optional wallet.
Expand Down Expand Up @@ -1168,7 +1169,7 @@ export const fetchExecutionTransactionReceipts = async (
receipts: ethers.TransactionReceipt[],
moduleAddress: string,
merkleRoot: string,
provider: SphinxJsonRpcProvider | InProcessEthersProvider
provider: SphinxJsonRpcProvider | HardhatEthersProvider
) => {
const module = new ethers.Contract(moduleAddress, SphinxModuleABI, provider)

Expand Down Expand Up @@ -1307,6 +1308,7 @@ export const attemptDeployment = async (
const signatures: string[] = signers
.map((signer) => signer.signature)
.filter((signature) => signature !== null) as any

;({ receipts, batches, finalStatus, failureAction } =
await executeDeployment(
targetNetworkNetworkConfig,
Expand All @@ -1323,7 +1325,6 @@ export const attemptDeployment = async (
targetNetworkNetworkConfig,
failureAction
)

return {
receipts: deploymentTransactionReceipts.map(
convertEthersTransactionReceipt
Expand All @@ -1337,6 +1338,7 @@ export const attemptDeployment = async (
await deploymentContext.handleError(e, deployment)
return
}

await deploymentContext.handleSuccess(
deploymentContext,
targetNetworkNetworkConfig
Expand Down
1 change: 0 additions & 1 deletion packages/core/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,3 @@ export * from './provider'
export * from './artifacts'
export * from './types'
export * from './errors'
export * from './provider'
17 changes: 9 additions & 8 deletions packages/core/src/languages/solidity/predeploys.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {
getOwnerAddress,
getSphinxConstants,
} from '@sphinx-labs/contracts'
import { HardhatEthersProvider } from '@nomicfoundation/hardhat-ethers/internal/hardhat-ethers-provider'
import ora from 'ora'

import {
Expand All @@ -21,7 +22,7 @@ import {
getImpersonatedSigner,
fundAccountMaxBalance,
} from '../../utils'
import { InProcessEthersProvider, SphinxJsonRpcProvider } from '../../provider'
import { SphinxJsonRpcProvider } from '../../provider'
import { ExecutionMode, RELAYER_ROLE } from '../../constants'
import {
fetchDripSizeForNetwork,
Expand All @@ -30,7 +31,7 @@ import {
} from '../../networks'

export const ensureSphinxAndGnosisSafeDeployed = async (
provider: SphinxJsonRpcProvider | InProcessEthersProvider,
provider: SphinxJsonRpcProvider | HardhatEthersProvider,
wallet: ethers.Wallet,
executionMode: ExecutionMode,
includeManagedServiceRoles: boolean,
Expand All @@ -57,7 +58,7 @@ export const ensureSphinxAndGnosisSafeDeployed = async (

export const cancelPreviousDripVersions = async (
Drippie: Contract,
provider: SphinxJsonRpcProvider | InProcessEthersProvider,
provider: SphinxJsonRpcProvider | HardhatEthersProvider,
wallet: ethers.Signer,
executionMode: ExecutionMode,
dripName: string,
Expand Down Expand Up @@ -102,7 +103,7 @@ export const cancelPreviousDripVersions = async (
}

export const checkSystemDeployed = async (
provider: SphinxJsonRpcProvider | InProcessEthersProvider
provider: SphinxJsonRpcProvider | HardhatEthersProvider
): Promise<boolean> => {
const contracts = getSphinxConstants()

Expand All @@ -119,7 +120,7 @@ export const checkSystemDeployed = async (
}

export const assignManagedServiceRoles = async (
provider: SphinxJsonRpcProvider | InProcessEthersProvider,
provider: SphinxJsonRpcProvider | HardhatEthersProvider,
signer: ethers.Signer,
relayers: string[],
executionMode: ExecutionMode,
Expand Down Expand Up @@ -267,7 +268,7 @@ export const assignManagedServiceRoles = async (
}

export const deploySphinxSystem = async (
provider: SphinxJsonRpcProvider | InProcessEthersProvider,
provider: SphinxJsonRpcProvider | HardhatEthersProvider,
signer: ethers.Signer,
relayers: string[],
executionMode: ExecutionMode,
Expand Down Expand Up @@ -318,7 +319,7 @@ export const deploySphinxSystem = async (
}

export const getDeterministicFactoryAddress = async (
provider: SphinxJsonRpcProvider | InProcessEthersProvider
provider: SphinxJsonRpcProvider | HardhatEthersProvider
) => {
// Deploy the deterministic deployer.
if (
Expand Down Expand Up @@ -366,7 +367,7 @@ export const getDeterministicFactoryAddress = async (
}

export const doDeterministicDeploy = async (
provider: SphinxJsonRpcProvider | InProcessEthersProvider,
provider: SphinxJsonRpcProvider | HardhatEthersProvider,
executionMode: ExecutionMode,
options: {
contract: {
Expand Down
Loading