Skip to content

Commit

Permalink
A minor tidy up of step 0 and step 1
Browse files Browse the repository at this point in the history
  • Loading branch information
shirren committed Nov 11, 2024
1 parent fec63a3 commit 1e2790a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
5 changes: 3 additions & 2 deletions scripts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,10 @@ Create a `.env` file. Use the `env.example` as a template. Set the following val

### `step0.ts`

In this step we deploy the `MultiCallDeploy` only. We use the standard deployment key (Orange key) for this deployment.
In this step we deploy the `MultiCallDeploy` only. We use the standard deployment key (Orange key) for this deployment, as the address of the MultiCallDeploy strictly does
not need to be the same across all the environments.

* Set the value of RELAYER_SUBMITTER_EOA_PUB_KEY to match the EOA of the primary Relayer submitter.
* Set the value of RELAYER_SUBMITTER_EOA_PUB_KEY to match the EOA of the primary Relayer submitter. The Submitter EOA is granted execute permission on the MultiCallDeploy.
* Set the `accountIndex` to 0 in `wallet-options.ts`.
* Execute the command `npx hardhat run scripts/step0.ts --network <ENV>`

Expand Down
1 change: 1 addition & 0 deletions scripts/step0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ async function step0(): Promise<EnvironmentInfo> {
fs.writeFileSync('step0.json', JSON.stringify({
multiCallAdminPubKey: multiCallAdminPubKey,
multiCallDeploy: multiCallDeploy.address,
submitterAddress: submitterAddress,
}, null, 1));

return env;
Expand Down
6 changes: 1 addition & 5 deletions scripts/step1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,11 @@ import { waitForInput } from './helper-functions';
**/
async function step1(): Promise<EnvironmentInfo> {
const env = loadEnvironmentInfo(hre.network.name);
const { network, submitterAddress } = env;
const multiCallAdminPubKey = process.env.MULTICALL_ADMIN_PUB_KEY;
const { network } = env;
const factoryAdminPubKey = process.env.FACTORY_ADMIN_PUB_KEY;
const multiCallDeployAddress = 'CHANGE_ME';

console.log(`[${network}] Starting deployment...`);
console.log(`[${network}] Submitter address ${submitterAddress}`);
console.log(`[${network}] multiCallAdminPubKey ${multiCallAdminPubKey}`);
console.log(`[${network}] factoryAdminPubKey ${factoryAdminPubKey}`);
console.log(`[${network}] multiCallDeployAddress ${multiCallDeployAddress}`);

Expand All @@ -36,7 +33,6 @@ async function step1(): Promise<EnvironmentInfo> {
const factory = await deployContract(env, wallets, 'Factory', [factoryAdminPubKey, multiCallDeployAddress]);

fs.writeFileSync('step1.json', JSON.stringify({
multiCallAdminPubKey: multiCallAdminPubKey,
factoryAdminPubKey: factoryAdminPubKey,
multiCallDeploy: multiCallDeployAddress,
factory: factory.address,
Expand Down

0 comments on commit 1e2790a

Please sign in to comment.