Skip to content
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

refactor(cli): split up deploy into modules #1384

Merged
merged 22 commits into from
Sep 15, 2023
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
73ba820
refactor(cli:deploy): Add txHelper. Simplify promise handling.
johngrantuk Aug 31, 2023
6c3ccd9
refactor(cli:deploy): Split into separate classes with own deploy/ins…
johngrantuk Sep 1, 2023
ee06186
refactor(cli:deploy): Remove unused import.
johngrantuk Sep 1, 2023
072be82
fix(cli:deploy): Handle coreModule installation correctly if already …
johngrantuk Sep 2, 2023
a8ce4d9
refactor(cli:deploy): Initial pass at class refactor - remove classes…
johngrantuk Sep 5, 2023
013701b
refactor(cli:deploy): Refactor initial contract deployments.
johngrantuk Sep 6, 2023
d829b12
refactor(cli:deploy): Remove txHelper class.
johngrantuk Sep 7, 2023
2a77044
chore(cli:deploy): Fix conflicts with main.
johngrantuk Sep 7, 2023
53c921e
fix(cli:deploy): Revert commits made by mistake.
johngrantuk Sep 7, 2023
5d1068e
refactor(cli:deploy): Fix nit.
johngrantuk Sep 8, 2023
c4b5e09
refactor(cli:deploy): Initial refactor of modules into utils.
johngrantuk Sep 11, 2023
8401327
refactor(cli:deploy): Module refactor.
johngrantuk Sep 12, 2023
5f86b73
refactor(cli:deploy): Register namespace.
johngrantuk Sep 12, 2023
536b496
refactor(cli:deploy): Refactor table registration.
johngrantuk Sep 12, 2023
64ad403
refactor(cli:deploy): System & function registrations.
johngrantuk Sep 12, 2023
4d3e447
refactor(cli:deploy): Refactor grant access.
johngrantuk Sep 12, 2023
154a0f4
Refactor(cli:deploy): Refactored deployments.
johngrantuk Sep 12, 2023
0b9a38a
refactor(cli:deploy): Move helper function to utils.
johngrantuk Sep 12, 2023
126c0a8
Merge remote-tracking branch 'origin/main' into refactor-deploy
holic Sep 15, 2023
aa5c711
switch from index imports to actual imports
holic Sep 15, 2023
7938c70
review
alvrs Sep 15, 2023
8ec9e9d
Merge branch 'main' into refactor-deploy
alvrs Sep 15, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/minimal/packages/contracts/worlds.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
"blockNumber": 21817970
},
"31337": {
"address": "0xE6E340D132b5f46d1e472DebcD681B2aBc16e57E"
"address": "0x5FbDB2315678afecb367f032d93F642f64180aa3"
}
}
20 changes: 20 additions & 0 deletions packages/cli/src/utils/coreModules.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import chalk from "chalk";
import { Contract } from "ethers";
import { TxConfig, fastTxExecute } from "./txHelpers";

export async function installCoreModule(
input: TxConfig & { worldContract: Contract; coreModuleAddress: string }
): Promise<number> {
console.log(chalk.blue("Installing CoreModule"));
const { worldContract, coreModuleAddress, confirmations } = input;
await fastTxExecute({
...input,
nonce: input.nonce++,
contract: worldContract,
func: "installRootModule",
args: [coreModuleAddress, "0x"],
confirmations,
});
console.log(chalk.green("Installed CoreModule"));
return input.nonce;
}
Loading