-
Notifications
You must be signed in to change notification settings - Fork 365
Add sovereign genesis hardhat #512
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
base: feature/v12
Are you sure you want to change the base?
Conversation
3856a4d
to
5b0d647
Compare
|
||
/** | ||
* Scan all SSTORE opcodes in a trace | ||
* Does not take into account revert operations neither depth |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whith the updated version, depth is taken into account
|
||
- Copy genesis base file: | ||
``` | ||
cp ./tools/createSovereignGenesis/genesis-base.json.example ./tools/createSovereignGenesis/genesis-base.json |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wrong path
src/genesis-hardhat/utils.ts
Outdated
} | ||
|
||
// Get proxy transaction hash | ||
const proxyTx = await contract.deploymentTransaction(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
await not needed
implStorageWrites[depthTokenWrappedImpl]; | ||
} | ||
} catch (error) { | ||
logger.error('Could not get Bridge implementation storage writes:', error); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logging the error is not enough, the script should exit/fail. Same for other logger.error
of the script
const txDeployTimelock = await timelockContract.deploymentTransaction(); | ||
const txDeployTimelockHash = txDeployTimelock ? txDeployTimelock.hash : undefined; | ||
|
||
// Transfer ownership of the proxyAdmon to the timelock |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// Transfer ownership of the proxyAdmon to the timelock | |
// Transfer ownership of the proxyAdmin to the timelock |
proxiedTokensManager, | ||
} = initializeParams; | ||
|
||
const txInitialitzeBridge = await sovereignChainBridgeContract.initialize( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const txInitialitzeBridge = await sovereignChainBridgeContract.initialize( | |
const txInitializeBridge = await sovereignChainBridgeContract.initialize( |
expectedStorageModifications.BridgeL2SovereignChain = await getExpectedStorageProxy( | ||
sovereignChainBridgeContract.target, | ||
); | ||
// Bridge initialitzation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// Bridge initialitzation | |
// Bridge initialization |
JSON.stringify(actualStorage, null, 2), | ||
); | ||
|
||
let equal = await deepEqual(storageModifications, expectedStorageModifications); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need await
|
94f02f3
to
7e88563
Compare
- `useAggOracleCommittee`: `true/false`. Indicates if use aggOracleCommittee | ||
- if `useAggOracleCommittee == true`: | ||
- `ownerAddress`: Address that will own the AggOracleCommittee contract (typically a timelock contract) | ||
- `aggOracleMembers`: Array of addresses that will act as initial oracle members |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Params are "aggOracleCommittee", "aggOracleOwner" according to the code
tokenWrappedAddress.toLocaleLowerCase().slice(2), | ||
); | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rebase with the commit of feature/v12
.
Add bridgeLib
since it is the latest SC deployed automatically by the bridge.
@@ -0,0 +1,120 @@ | |||
# Create sovereign genesis | |||
Script to generate the genesis file for a rollup with `SovereignContracts`. This genesis is aimed to be used for chains that are run with vanilla clients. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add warning code is not audited yep
const dateStr = new Date().toISOString(); | ||
|
||
async function main() { | ||
logger.info('Start create-sovereign-genesis tool'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add logger warning --> code is not audited yet
d586c3a
to
9a29126
Compare
Add tool to create genesis with hardhat