-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use existing create2 deployer so that we don't have to worry about de…
…ployer nonces (#1150) * use existing create2 deployer so that we don't have to worry about deployer nonces * add bytecode hash script and update registry deploy script to use hex salt * deploy wstETH & sxDAI pools to gnosis * fix remappings * prettier * fix devnet image * another devnet fix * fix * fix * f
- Loading branch information
Showing
15 changed files
with
274 additions
and
43 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 |
---|---|---|
|
@@ -6,7 +6,6 @@ on: | |
- "v*" | ||
|
||
jobs: | ||
|
||
build-wheel: | ||
name: build hyperdrivetypes wheel | ||
runs-on: ubuntu-latest | ||
|
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 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,7 @@ | ||
// SPDX-License-Identifier: Apache-2.0 | ||
pragma solidity ^0.8.20; | ||
|
||
import { ICreateX } from "createx/ICreateX.sol"; | ||
|
||
/// @notice This is included so that it appears in artifacts for tooling. | ||
interface IDeterministicDeployer is ICreateX {} |
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 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
Large diffs are not rendered by default.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import { task } from "hardhat/config"; | ||
import { encodeAbiParameters, encodePacked, keccak256 } from "viem"; | ||
import { | ||
HyperdriveDeployNamedTask, | ||
HyperdriveDeployNamedTaskParams, | ||
} from "./lib"; | ||
|
||
export type RegistryCreate2InfoParams = HyperdriveDeployNamedTaskParams; | ||
|
||
HyperdriveDeployNamedTask( | ||
task( | ||
"registry-create2-info", | ||
"prints the bytecode hash of a HyperdriveRegistry with the provided name", | ||
), | ||
).setAction(async ({ name }: RegistryCreate2InfoParams, { artifacts }) => { | ||
// Assemble the creation code by packing the registry contract's | ||
// bytecode with its constructor arguments. | ||
let artifact = artifacts.readArtifactSync("HyperdriveRegistry"); | ||
let creationCode = encodePacked( | ||
["bytes", "bytes"], | ||
[ | ||
artifact.bytecode, | ||
encodeAbiParameters([{ name: "_name", type: "string" }], [name]), | ||
], | ||
); | ||
let hash = keccak256(creationCode); | ||
console.log(`HASH: ${hash}`); | ||
}); |
Oops, something went wrong.