forked from sphinx-labs/sphinx
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
967b529
commit 19cf359
Showing
27 changed files
with
1,873 additions
and
884 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
'@chugsplash/contracts': minor | ||
'@chugsplash/core': minor | ||
'@chugsplash/demo': minor | ||
'@chugsplash/plugins': minor | ||
--- | ||
|
||
Adds local ChugSplash deployments for testing contracts on the Hardhat network. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
import { ethers } from 'ethers' | ||
|
||
import { | ||
DefaultAdapterArtifact, | ||
ProxyUpdaterArtifact, | ||
ChugSplashRegistryArtifact, | ||
} from './ifaces' | ||
|
||
const DETERMINISTIC_DEPLOYMENT_PROXY_ADDRESS = | ||
'0x4e59b44847b379578588920ca78fbf26c0b4956c' | ||
export const OWNER_BOND_AMOUNT = ethers.utils.parseUnits('0.1') | ||
export const EXECUTOR_BOND_AMOUNT = ethers.utils.parseUnits('0.1') | ||
export const EXECUTION_LOCK_TIME = 15 * 60 | ||
|
||
export const PROXY_UPDATER_ADDRESS = ethers.utils.getCreate2Address( | ||
DETERMINISTIC_DEPLOYMENT_PROXY_ADDRESS, | ||
ethers.utils.solidityKeccak256(['string'], ['ProxyUpdater']), | ||
ethers.utils.solidityKeccak256(['bytes'], [ProxyUpdaterArtifact.bytecode]) | ||
) | ||
|
||
export const CHUGSPLASH_REGISTRY_ADDRESS = ethers.utils.getCreate2Address( | ||
DETERMINISTIC_DEPLOYMENT_PROXY_ADDRESS, | ||
ethers.utils.solidityKeccak256(['string'], ['ChugSplashRegistry']), | ||
ethers.utils.solidityKeccak256( | ||
['bytes', 'bytes'], | ||
[ | ||
ChugSplashRegistryArtifact.bytecode, | ||
ethers.utils.defaultAbiCoder.encode( | ||
['address', 'uint256', 'uint256', 'uint256'], | ||
[ | ||
PROXY_UPDATER_ADDRESS, | ||
OWNER_BOND_AMOUNT, | ||
EXECUTOR_BOND_AMOUNT, | ||
EXECUTION_LOCK_TIME, | ||
] | ||
), | ||
] | ||
) | ||
) | ||
|
||
export const DEFAULT_ADAPTER_ADDRESS = | ||
ethers.utils.getCreate2Address( | ||
DETERMINISTIC_DEPLOYMENT_PROXY_ADDRESS, | ||
ethers.utils.solidityKeccak256(['string'], ['DefaultAdapter']), | ||
ethers.utils.solidityKeccak256(['bytes'], [DefaultAdapterArtifact.bytecode]) | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,10 @@ | ||
/* eslint-disable @typescript-eslint/no-var-requires */ | ||
export const ChugSplashRegistryArtifact = require('../artifacts/contracts/ChugSplashRegistry.sol/ChugSplashRegistry.json') | ||
export const ChugSplashManagerArtifact = require('../artifacts/contracts/ChugSplashManager.sol/ChugSplashManager.json') | ||
export const ProxyUpdaterArtifact = require('../artifacts/contracts/ProxyUpdater.sol/ProxyUpdater.json') | ||
export const DefaultAdapterArtifact = require('../artifacts/contracts/adapters/DefaultAdapter.sol/DefaultAdapter.json') | ||
|
||
export const ChugSplashRegistryABI = ChugSplashRegistryArtifact.abi | ||
export const ChugSplashManagerABI = ChugSplashManagerArtifact.abi | ||
export const ProxyUpdaterABI = ProxyUpdaterArtifact.abi | ||
export const DefaultAdapterABI = DefaultAdapterArtifact.abi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
export * from './ifaces' | ||
export * from './predeploys' | ||
export * from './constants' |
Oops, something went wrong.