-
Notifications
You must be signed in to change notification settings - Fork 144
/
init.ts
27 lines (24 loc) · 797 Bytes
/
init.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import fs from "fs/promises";
import path from "path";
import prettier from "prettier";
import { ethers } from "ethers";
const INIT_CONFIG = {
bundlerUrl: "http://localhost:4337",
rpcUrl: "https://rpc-mumbai.maticvigil.com/",
signingKey: new ethers.Wallet(ethers.utils.randomBytes(32)).privateKey,
entryPoint: "0x78d4f01f56b982a3B03C4E127A5D3aFa8EBee686",
simpleAccountFactory: "0xe19E9755942BB0bD0cCCCe25B1742596b8A8250b",
};
const CONFIG_PATH = path.resolve(__dirname, "../config.json");
async function main() {
return fs.writeFile(
CONFIG_PATH,
prettier.format(JSON.stringify(INIT_CONFIG, null, 2), { parser: "json" })
);
}
main()
.then(() => console.log(`Config written to ${CONFIG_PATH}`))
.catch((error) => {
console.error(error);
process.exit(1);
});