From 5d7549808a44a671bc0a873496c0bc33ab712516 Mon Sep 17 00:00:00 2001 From: Deepu Date: Mon, 1 Apr 2024 21:48:29 +0530 Subject: [PATCH 1/4] remove build step from deploy scripts #2582 --- templates/react/packages/contracts/package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/templates/react/packages/contracts/package.json b/templates/react/packages/contracts/package.json index b2640d68cd..e030a8459a 100644 --- a/templates/react/packages/contracts/package.json +++ b/templates/react/packages/contracts/package.json @@ -6,9 +6,9 @@ "scripts": { "build": "mud build", "clean": "forge clean && rimraf src/codegen", - "deploy:local": "pnpm run build && mud deploy", - "deploy:testnet": "pnpm run build && mud deploy --profile=lattice-testnet", - "dev": "pnpm mud dev-contracts", + "deploy:local": "mud deploy", + "deploy:testnet": "mud deploy --profile=lattice-testnet", + "dev": "mud dev-contracts", "lint": "pnpm run prettier && pnpm run solhint", "prettier": "prettier --write 'src/**/*.sol'", "solhint": "solhint --config ./.solhint.json 'src/**/*.sol' --fix", From fcec9368cd36a3c918085b2fc1afa2c7c744fca9 Mon Sep 17 00:00:00 2001 From: Kevin Ingersoll Date: Wed, 15 May 2024 18:41:23 +0100 Subject: [PATCH 2/4] remove unnecessary build --- examples/minimal/packages/contracts/package.json | 8 ++++---- .../multiple-accounts/packages/contracts/package.json | 6 +++--- templates/phaser/packages/contracts/package.json | 6 +++--- templates/react-ecs/packages/contracts/package.json | 6 +++--- templates/threejs/packages/contracts/package.json | 6 +++--- templates/vanilla/packages/contracts/package.json | 6 +++--- 6 files changed, 19 insertions(+), 19 deletions(-) diff --git a/examples/minimal/packages/contracts/package.json b/examples/minimal/packages/contracts/package.json index cb4a8c3286..acd20fc1a4 100644 --- a/examples/minimal/packages/contracts/package.json +++ b/examples/minimal/packages/contracts/package.json @@ -6,10 +6,10 @@ "scripts": { "build": "mud build", "clean": "forge clean && rimraf src/codegen", - "deploy:local": "pnpm run build && mud deploy", - "deploy:testnet": "pnpm run build && mud deploy --profile=lattice-testnet", - "dev": "pnpm mud dev-contracts", - "faucet": "DEBUG=mud:faucet pnpm faucet-server", + "deploy:local": "mud deploy", + "deploy:testnet": "mud deploy --profile=lattice-testnet", + "dev": "mud dev-contracts", + "faucet": "DEBUG=mud:faucet faucet-server", "lint": "pnpm run prettier && pnpm run solhint", "prettier": "prettier --write 'src/**/*.sol'", "solhint": "solhint --config ./.solhint.json 'src/**/*.sol' --fix", diff --git a/examples/multiple-accounts/packages/contracts/package.json b/examples/multiple-accounts/packages/contracts/package.json index 71892b5417..cd8ba3e733 100644 --- a/examples/multiple-accounts/packages/contracts/package.json +++ b/examples/multiple-accounts/packages/contracts/package.json @@ -6,9 +6,9 @@ "scripts": { "build": "mud build", "clean": "forge clean && rimraf src/codegen", - "deploy:local": "pnpm run build && mud deploy", - "deploy:testnet": "pnpm run build && mud deploy --profile=lattice-testnet", - "dev": "pnpm mud dev-contracts", + "deploy:local": "mud deploy", + "deploy:testnet": "mud deploy --profile=lattice-testnet", + "dev": "mud dev-contracts", "lint": "pnpm run prettier && pnpm run solhint", "prettier": "prettier --write 'src/**/*.sol'", "solhint": "solhint --config ./.solhint.json 'src/**/*.sol' --fix", diff --git a/templates/phaser/packages/contracts/package.json b/templates/phaser/packages/contracts/package.json index b2640d68cd..e030a8459a 100644 --- a/templates/phaser/packages/contracts/package.json +++ b/templates/phaser/packages/contracts/package.json @@ -6,9 +6,9 @@ "scripts": { "build": "mud build", "clean": "forge clean && rimraf src/codegen", - "deploy:local": "pnpm run build && mud deploy", - "deploy:testnet": "pnpm run build && mud deploy --profile=lattice-testnet", - "dev": "pnpm mud dev-contracts", + "deploy:local": "mud deploy", + "deploy:testnet": "mud deploy --profile=lattice-testnet", + "dev": "mud dev-contracts", "lint": "pnpm run prettier && pnpm run solhint", "prettier": "prettier --write 'src/**/*.sol'", "solhint": "solhint --config ./.solhint.json 'src/**/*.sol' --fix", diff --git a/templates/react-ecs/packages/contracts/package.json b/templates/react-ecs/packages/contracts/package.json index b2640d68cd..e030a8459a 100644 --- a/templates/react-ecs/packages/contracts/package.json +++ b/templates/react-ecs/packages/contracts/package.json @@ -6,9 +6,9 @@ "scripts": { "build": "mud build", "clean": "forge clean && rimraf src/codegen", - "deploy:local": "pnpm run build && mud deploy", - "deploy:testnet": "pnpm run build && mud deploy --profile=lattice-testnet", - "dev": "pnpm mud dev-contracts", + "deploy:local": "mud deploy", + "deploy:testnet": "mud deploy --profile=lattice-testnet", + "dev": "mud dev-contracts", "lint": "pnpm run prettier && pnpm run solhint", "prettier": "prettier --write 'src/**/*.sol'", "solhint": "solhint --config ./.solhint.json 'src/**/*.sol' --fix", diff --git a/templates/threejs/packages/contracts/package.json b/templates/threejs/packages/contracts/package.json index f5c5dc1be2..fa5f14bdd5 100644 --- a/templates/threejs/packages/contracts/package.json +++ b/templates/threejs/packages/contracts/package.json @@ -6,9 +6,9 @@ "scripts": { "build": "mud build", "clean": "forge clean && rimraf src/codegen", - "deploy:local": "pnpm run build && mud deploy", - "deploy:testnet": "pnpm run build && mud deploy --profile=lattice-testnet", - "dev": "pnpm mud dev-contracts", + "deploy:local": "mud deploy", + "deploy:testnet": "mud deploy --profile=lattice-testnet", + "dev": "mud dev-contracts", "lint": "pnpm run prettier && pnpm run solhint", "prettier": "prettier --write 'src/**/*.sol'", "solhint": "solhint --config ./.solhint.json 'src/**/*.sol' --fix", diff --git a/templates/vanilla/packages/contracts/package.json b/templates/vanilla/packages/contracts/package.json index b2640d68cd..e030a8459a 100644 --- a/templates/vanilla/packages/contracts/package.json +++ b/templates/vanilla/packages/contracts/package.json @@ -6,9 +6,9 @@ "scripts": { "build": "mud build", "clean": "forge clean && rimraf src/codegen", - "deploy:local": "pnpm run build && mud deploy", - "deploy:testnet": "pnpm run build && mud deploy --profile=lattice-testnet", - "dev": "pnpm mud dev-contracts", + "deploy:local": "mud deploy", + "deploy:testnet": "mud deploy --profile=lattice-testnet", + "dev": "mud dev-contracts", "lint": "pnpm run prettier && pnpm run solhint", "prettier": "prettier --write 'src/**/*.sol'", "solhint": "solhint --config ./.solhint.json 'src/**/*.sol' --fix", From 6efff87c2c6b08e0a7320e7705a64c9a2c547ecd Mon Sep 17 00:00:00 2001 From: Kevin Ingersoll Date: Wed, 15 May 2024 18:46:10 +0100 Subject: [PATCH 3/4] add scripts to deploy to garnet/redstone --- e2e/packages/contracts/foundry.toml | 3 --- examples/minimal/packages/contracts/foundry.toml | 3 --- examples/minimal/packages/contracts/package.json | 1 - examples/multiple-accounts/packages/contracts/foundry.toml | 3 --- examples/multiple-accounts/packages/contracts/package.json | 1 - templates/phaser/packages/contracts/package.json | 3 ++- templates/react-ecs/packages/contracts/package.json | 3 ++- templates/react/packages/contracts/package.json | 3 ++- templates/threejs/packages/contracts/package.json | 3 ++- templates/vanilla/packages/contracts/package.json | 3 ++- test/mock-game-contracts/foundry.toml | 3 --- 11 files changed, 10 insertions(+), 19 deletions(-) diff --git a/e2e/packages/contracts/foundry.toml b/e2e/packages/contracts/foundry.toml index e8a674b19f..6ecb883f45 100644 --- a/e2e/packages/contracts/foundry.toml +++ b/e2e/packages/contracts/foundry.toml @@ -19,6 +19,3 @@ extra_output_files = [ "evm.bytecode" ] fs_permissions = [{ access = "read", path = "./"}] - -[profile.lattice-testnet] -eth_rpc_url = "https://follower.testnet-chain.linfra.xyz" diff --git a/examples/minimal/packages/contracts/foundry.toml b/examples/minimal/packages/contracts/foundry.toml index 3eb96af5e6..8e692ed668 100644 --- a/examples/minimal/packages/contracts/foundry.toml +++ b/examples/minimal/packages/contracts/foundry.toml @@ -19,6 +19,3 @@ extra_output_files = [ "evm.bytecode" ] fs_permissions = [{ access = "read", path = "./"}] - -[profile.lattice-testnet] -eth_rpc_url = "https://follower.testnet-chain.linfra.xyz" diff --git a/examples/minimal/packages/contracts/package.json b/examples/minimal/packages/contracts/package.json index acd20fc1a4..d7c8d0ddc0 100644 --- a/examples/minimal/packages/contracts/package.json +++ b/examples/minimal/packages/contracts/package.json @@ -7,7 +7,6 @@ "build": "mud build", "clean": "forge clean && rimraf src/codegen", "deploy:local": "mud deploy", - "deploy:testnet": "mud deploy --profile=lattice-testnet", "dev": "mud dev-contracts", "faucet": "DEBUG=mud:faucet faucet-server", "lint": "pnpm run prettier && pnpm run solhint", diff --git a/examples/multiple-accounts/packages/contracts/foundry.toml b/examples/multiple-accounts/packages/contracts/foundry.toml index 15424eb6d8..32a71c334d 100644 --- a/examples/multiple-accounts/packages/contracts/foundry.toml +++ b/examples/multiple-accounts/packages/contracts/foundry.toml @@ -21,6 +21,3 @@ extra_output_files = [ "evm.bytecode" ] fs_permissions = [{ access = "read", path = "./"}] - -[profile.lattice-testnet] -eth_rpc_url = "https://follower.testnet-chain.linfra.xyz" diff --git a/examples/multiple-accounts/packages/contracts/package.json b/examples/multiple-accounts/packages/contracts/package.json index cd8ba3e733..cf95cdf8cb 100644 --- a/examples/multiple-accounts/packages/contracts/package.json +++ b/examples/multiple-accounts/packages/contracts/package.json @@ -7,7 +7,6 @@ "build": "mud build", "clean": "forge clean && rimraf src/codegen", "deploy:local": "mud deploy", - "deploy:testnet": "mud deploy --profile=lattice-testnet", "dev": "mud dev-contracts", "lint": "pnpm run prettier && pnpm run solhint", "prettier": "prettier --write 'src/**/*.sol'", diff --git a/templates/phaser/packages/contracts/package.json b/templates/phaser/packages/contracts/package.json index e030a8459a..7841f81ed4 100644 --- a/templates/phaser/packages/contracts/package.json +++ b/templates/phaser/packages/contracts/package.json @@ -6,8 +6,9 @@ "scripts": { "build": "mud build", "clean": "forge clean && rimraf src/codegen", + "deploy:garnet": "mud deploy --profile=garnet", "deploy:local": "mud deploy", - "deploy:testnet": "mud deploy --profile=lattice-testnet", + "deploy:redstone": "mud deploy --profile=redstone", "dev": "mud dev-contracts", "lint": "pnpm run prettier && pnpm run solhint", "prettier": "prettier --write 'src/**/*.sol'", diff --git a/templates/react-ecs/packages/contracts/package.json b/templates/react-ecs/packages/contracts/package.json index e030a8459a..7841f81ed4 100644 --- a/templates/react-ecs/packages/contracts/package.json +++ b/templates/react-ecs/packages/contracts/package.json @@ -6,8 +6,9 @@ "scripts": { "build": "mud build", "clean": "forge clean && rimraf src/codegen", + "deploy:garnet": "mud deploy --profile=garnet", "deploy:local": "mud deploy", - "deploy:testnet": "mud deploy --profile=lattice-testnet", + "deploy:redstone": "mud deploy --profile=redstone", "dev": "mud dev-contracts", "lint": "pnpm run prettier && pnpm run solhint", "prettier": "prettier --write 'src/**/*.sol'", diff --git a/templates/react/packages/contracts/package.json b/templates/react/packages/contracts/package.json index e030a8459a..7841f81ed4 100644 --- a/templates/react/packages/contracts/package.json +++ b/templates/react/packages/contracts/package.json @@ -6,8 +6,9 @@ "scripts": { "build": "mud build", "clean": "forge clean && rimraf src/codegen", + "deploy:garnet": "mud deploy --profile=garnet", "deploy:local": "mud deploy", - "deploy:testnet": "mud deploy --profile=lattice-testnet", + "deploy:redstone": "mud deploy --profile=redstone", "dev": "mud dev-contracts", "lint": "pnpm run prettier && pnpm run solhint", "prettier": "prettier --write 'src/**/*.sol'", diff --git a/templates/threejs/packages/contracts/package.json b/templates/threejs/packages/contracts/package.json index fa5f14bdd5..c49a33d0a6 100644 --- a/templates/threejs/packages/contracts/package.json +++ b/templates/threejs/packages/contracts/package.json @@ -6,8 +6,9 @@ "scripts": { "build": "mud build", "clean": "forge clean && rimraf src/codegen", + "deploy:garnet": "mud deploy --profile=garnet", "deploy:local": "mud deploy", - "deploy:testnet": "mud deploy --profile=lattice-testnet", + "deploy:redstone": "mud deploy --profile=redstone", "dev": "mud dev-contracts", "lint": "pnpm run prettier && pnpm run solhint", "prettier": "prettier --write 'src/**/*.sol'", diff --git a/templates/vanilla/packages/contracts/package.json b/templates/vanilla/packages/contracts/package.json index e030a8459a..7841f81ed4 100644 --- a/templates/vanilla/packages/contracts/package.json +++ b/templates/vanilla/packages/contracts/package.json @@ -6,8 +6,9 @@ "scripts": { "build": "mud build", "clean": "forge clean && rimraf src/codegen", + "deploy:garnet": "mud deploy --profile=garnet", "deploy:local": "mud deploy", - "deploy:testnet": "mud deploy --profile=lattice-testnet", + "deploy:redstone": "mud deploy --profile=redstone", "dev": "mud dev-contracts", "lint": "pnpm run prettier && pnpm run solhint", "prettier": "prettier --write 'src/**/*.sol'", diff --git a/test/mock-game-contracts/foundry.toml b/test/mock-game-contracts/foundry.toml index e8a674b19f..6ecb883f45 100644 --- a/test/mock-game-contracts/foundry.toml +++ b/test/mock-game-contracts/foundry.toml @@ -19,6 +19,3 @@ extra_output_files = [ "evm.bytecode" ] fs_permissions = [{ access = "read", path = "./"}] - -[profile.lattice-testnet] -eth_rpc_url = "https://follower.testnet-chain.linfra.xyz" From fec095600e726c80ab7d89f8b29f82df1978618c Mon Sep 17 00:00:00 2001 From: Kevin Ingersoll Date: Wed, 15 May 2024 11:07:46 -0700 Subject: [PATCH 4/4] Create shy-kangaroos-fry.md --- .changeset/shy-kangaroos-fry.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/shy-kangaroos-fry.md diff --git a/.changeset/shy-kangaroos-fry.md b/.changeset/shy-kangaroos-fry.md new file mode 100644 index 0000000000..458ee55e5e --- /dev/null +++ b/.changeset/shy-kangaroos-fry.md @@ -0,0 +1,5 @@ +--- +"create-mud": patch +--- + +Removed unnecessary build step in scripts and added deploy scripts for Redstone and Garnet chains.