diff --git a/.changeset/rotten-turtles-laugh.md b/.changeset/rotten-turtles-laugh.md new file mode 100644 index 0000000000..a9a89b29c1 --- /dev/null +++ b/.changeset/rotten-turtles-laugh.md @@ -0,0 +1,5 @@ +--- +"@latticexyz/cli": patch +--- + +Removed broken `mud faucet` command. diff --git a/.changeset/sixty-frogs-greet.md b/.changeset/sixty-frogs-greet.md new file mode 100644 index 0000000000..1c30b8a653 --- /dev/null +++ b/.changeset/sixty-frogs-greet.md @@ -0,0 +1,5 @@ +--- +"create-mud": patch +--- + +Removed usages of old testnet faucet in templates. The previous testnet faucet is broken, deprecated, and going offline soon. We'll be replacing the burner account pattern with something better very soon! diff --git a/docs/pages/cli/_meta.js b/docs/pages/cli/_meta.js index 3f8c4a3270..796492afca 100644 --- a/docs/pages/cli/_meta.js +++ b/docs/pages/cli/_meta.js @@ -6,6 +6,5 @@ export default { verify: "mud verify", "dev-contracts": "mud dev-contracts", "abi-ts": "mud abi-ts", - faucet: "mud faucet", "set-version": "mud set-version", }; diff --git a/docs/pages/cli/faucet.mdx b/docs/pages/cli/faucet.mdx deleted file mode 100644 index bb0bfb1f9c..0000000000 --- a/docs/pages/cli/faucet.mdx +++ /dev/null @@ -1,5 +0,0 @@ -# mud faucet - -This command is currently used to interact with the deprecated faucet service on the deprecated "lattice testnet". Once the new Redstone devnet is available, it will be updated to interact with the new [faucet service](/services/faucet). - -In the meantime, we recommend to use the [Redstone Holesky testnet](https://redstone.xyz) and self-hosted [faucet service](/services/faucet). See [the sample client program](https://github.com/latticexyz/mud/tree/main/examples/faucet-client) for a usage example. diff --git a/e2e/packages/client-vanilla/package.json b/e2e/packages/client-vanilla/package.json index d7f2a77d3d..850b4d5c38 100644 --- a/e2e/packages/client-vanilla/package.json +++ b/e2e/packages/client-vanilla/package.json @@ -15,7 +15,6 @@ "@latticexyz/dev-tools": "link:../../../packages/dev-tools", "@latticexyz/recs": "link:../../../packages/recs", "@latticexyz/schema-type": "link:../../../packages/schema-type", - "@latticexyz/services": "link:../../../packages/services", "@latticexyz/store-sync": "link:../../../packages/store-sync", "@latticexyz/utils": "link:../../../packages/utils", "@latticexyz/world": "link:../../../packages/world", diff --git a/e2e/packages/client-vanilla/src/mud/getNetworkConfig.ts b/e2e/packages/client-vanilla/src/mud/getNetworkConfig.ts index b5f06918e9..67ca3c936c 100644 --- a/e2e/packages/client-vanilla/src/mud/getNetworkConfig.ts +++ b/e2e/packages/client-vanilla/src/mud/getNetworkConfig.ts @@ -25,7 +25,6 @@ export async function getNetworkConfig() { privateKey: params.get("privateKey") ?? getBurnerPrivateKey(), chainId, chain, - faucetServiceUrl: params.get("faucet") ?? chain.faucetUrl, worldAddress, initialBlockNumber, indexerUrl: params.get("indexerUrl"), diff --git a/e2e/packages/client-vanilla/src/mud/setupNetwork.ts b/e2e/packages/client-vanilla/src/mud/setupNetwork.ts index ea404d4344..f051bcfa6f 100644 --- a/e2e/packages/client-vanilla/src/mud/setupNetwork.ts +++ b/e2e/packages/client-vanilla/src/mud/setupNetwork.ts @@ -1,5 +1,4 @@ -import { createPublicClient, http, createWalletClient, Hex, parseEther, ClientConfig, stringToHex } from "viem"; -import { createFaucetService } from "@latticexyz/services/faucet"; +import { createPublicClient, http, createWalletClient, Hex, ClientConfig, stringToHex } from "viem"; import { encodeEntity, syncToRecs } from "@latticexyz/store-sync/recs"; import { getNetworkConfig } from "./getNetworkConfig"; import { world } from "./world"; @@ -52,30 +51,6 @@ export async function setupNetwork() { }), }); - // Request drip from faucet - if (networkConfig.faucetServiceUrl) { - const address = burnerAccount.address; - console.info("[Dev Faucet]: Player address -> ", address); - - const faucet = createFaucetService(networkConfig.faucetServiceUrl); - - const requestDrip = async () => { - const balance = await publicClient.getBalance({ address }); - console.info(`[Dev Faucet]: Player balance -> ${balance}`); - const lowBalance = balance < parseEther("1"); - if (lowBalance) { - console.info("[Dev Faucet]: Balance is low, dripping funds to player"); - // Double drip - await faucet.dripDev({ address }); - await faucet.dripDev({ address }); - } - }; - - requestDrip(); - // Request a drip every 20 seconds - setInterval(requestDrip, 20000); - } - return { world, components, diff --git a/e2e/pnpm-lock.yaml b/e2e/pnpm-lock.yaml index 00648fd18e..fea9108916 100644 --- a/e2e/pnpm-lock.yaml +++ b/e2e/pnpm-lock.yaml @@ -29,9 +29,6 @@ importers: '@latticexyz/schema-type': specifier: link:../../../packages/schema-type version: link:../../../packages/schema-type - '@latticexyz/services': - specifier: link:../../../packages/services - version: link:../../../packages/services '@latticexyz/store-sync': specifier: link:../../../packages/store-sync version: link:../../../packages/store-sync diff --git a/examples/minimal/packages/client-phaser/package.json b/examples/minimal/packages/client-phaser/package.json index 58c4e8d370..15b73113a9 100644 --- a/examples/minimal/packages/client-phaser/package.json +++ b/examples/minimal/packages/client-phaser/package.json @@ -17,7 +17,6 @@ "@latticexyz/react": "link:../../../../packages/react", "@latticexyz/recs": "link:../../../../packages/recs", "@latticexyz/schema-type": "link:../../../../packages/schema-type", - "@latticexyz/services": "link:../../../../packages/services", "@latticexyz/store-sync": "link:../../../../packages/store-sync", "@latticexyz/utils": "link:../../../../packages/utils", "@latticexyz/world": "link:../../../../packages/world", diff --git a/examples/minimal/packages/client-phaser/src/mud/getNetworkConfig.ts b/examples/minimal/packages/client-phaser/src/mud/getNetworkConfig.ts index 47d5880408..e77e5e2e09 100644 --- a/examples/minimal/packages/client-phaser/src/mud/getNetworkConfig.ts +++ b/examples/minimal/packages/client-phaser/src/mud/getNetworkConfig.ts @@ -25,7 +25,6 @@ export async function getNetworkConfig() { privateKey: getBurnerPrivateKey(), chainId, chain, - faucetServiceUrl: params.get("faucet") ?? chain.faucetUrl, worldAddress, initialBlockNumber, }; diff --git a/examples/minimal/packages/client-phaser/src/mud/setupNetwork.ts b/examples/minimal/packages/client-phaser/src/mud/setupNetwork.ts index e8348e953b..2ee265602d 100644 --- a/examples/minimal/packages/client-phaser/src/mud/setupNetwork.ts +++ b/examples/minimal/packages/client-phaser/src/mud/setupNetwork.ts @@ -1,5 +1,4 @@ -import { createPublicClient, fallback, webSocket, http, createWalletClient, Hex, parseEther, ClientConfig } from "viem"; -import { createFaucetService } from "@latticexyz/services/faucet"; +import { createPublicClient, fallback, webSocket, http, createWalletClient, Hex, ClientConfig } from "viem"; import { encodeEntity, syncToRecs } from "@latticexyz/store-sync/recs"; import { getNetworkConfig } from "./getNetworkConfig"; import { world } from "./world"; @@ -43,30 +42,6 @@ export async function setupNetwork() { startBlock: BigInt(networkConfig.initialBlockNumber), }); - // Request drip from faucet - if (networkConfig.faucetServiceUrl) { - const address = burnerAccount.address; - console.info("[Dev Faucet]: Player address -> ", address); - - const faucet = createFaucetService(networkConfig.faucetServiceUrl); - - const requestDrip = async () => { - const balance = await publicClient.getBalance({ address }); - console.info(`[Dev Faucet]: Player balance -> ${balance}`); - const lowBalance = balance < parseEther("1"); - if (lowBalance) { - console.info("[Dev Faucet]: Balance is low, dripping funds to player"); - // Double drip - await faucet.dripDev({ address }); - await faucet.dripDev({ address }); - } - }; - - requestDrip(); - // Request a drip every 20 seconds - setInterval(requestDrip, 20000); - } - return { world, components, diff --git a/examples/minimal/packages/client-react/package.json b/examples/minimal/packages/client-react/package.json index 82db6ad521..0f931adcd7 100644 --- a/examples/minimal/packages/client-react/package.json +++ b/examples/minimal/packages/client-react/package.json @@ -17,7 +17,6 @@ "@latticexyz/react": "link:../../../../packages/react", "@latticexyz/recs": "link:../../../../packages/recs", "@latticexyz/schema-type": "link:../../../../packages/schema-type", - "@latticexyz/services": "link:../../../../packages/services", "@latticexyz/store-sync": "link:../../../../packages/store-sync", "@latticexyz/utils": "link:../../../../packages/utils", "@latticexyz/world": "link:../../../../packages/world", diff --git a/examples/minimal/packages/client-react/src/mud/getNetworkConfig.ts b/examples/minimal/packages/client-react/src/mud/getNetworkConfig.ts index 47d5880408..e77e5e2e09 100644 --- a/examples/minimal/packages/client-react/src/mud/getNetworkConfig.ts +++ b/examples/minimal/packages/client-react/src/mud/getNetworkConfig.ts @@ -25,7 +25,6 @@ export async function getNetworkConfig() { privateKey: getBurnerPrivateKey(), chainId, chain, - faucetServiceUrl: params.get("faucet") ?? chain.faucetUrl, worldAddress, initialBlockNumber, }; diff --git a/examples/minimal/packages/client-react/src/mud/setupNetwork.ts b/examples/minimal/packages/client-react/src/mud/setupNetwork.ts index c26d4fe250..9f76938d94 100644 --- a/examples/minimal/packages/client-react/src/mud/setupNetwork.ts +++ b/examples/minimal/packages/client-react/src/mud/setupNetwork.ts @@ -6,7 +6,6 @@ import IWorldAbi from "contracts/out/IWorld.sol/IWorld.abi.json"; import { ContractWrite, createBurnerAccount, getContract, resourceToHex, transportObserver } from "@latticexyz/common"; import { Subject, share } from "rxjs"; import mudConfig from "contracts/mud.config"; -import { createClient as createFaucetClient } from "@latticexyz/faucet"; export type SetupNetworkResult = Awaited>; @@ -56,22 +55,6 @@ export async function setupNetwork() { startBlock: BigInt(networkConfig.initialBlockNumber), } as const); - try { - console.log("creating faucet client"); - const faucet = createFaucetClient({ url: "http://localhost:3002/trpc" }); - - const drip = async () => { - console.log("dripping"); - const tx = await faucet.drip.mutate({ address: burnerAccount.address }); - console.log("got drip", tx); - }; - - drip(); - setInterval(drip, 20_000); - } catch (e) { - console.error(e); - } - return { world, components, diff --git a/examples/minimal/packages/client-vanilla/package.json b/examples/minimal/packages/client-vanilla/package.json index 589c0b538d..26e3a73821 100644 --- a/examples/minimal/packages/client-vanilla/package.json +++ b/examples/minimal/packages/client-vanilla/package.json @@ -15,7 +15,6 @@ "@latticexyz/dev-tools": "link:../../../../packages/dev-tools", "@latticexyz/recs": "link:../../../../packages/recs", "@latticexyz/schema-type": "link:../../../../packages/schema-type", - "@latticexyz/services": "link:../../../../packages/services", "@latticexyz/store-sync": "link:../../../../packages/store-sync", "@latticexyz/utils": "link:../../../../packages/utils", "@latticexyz/world": "link:../../../../packages/world", diff --git a/examples/minimal/packages/client-vanilla/src/mud/getNetworkConfig.ts b/examples/minimal/packages/client-vanilla/src/mud/getNetworkConfig.ts index 47d5880408..e77e5e2e09 100644 --- a/examples/minimal/packages/client-vanilla/src/mud/getNetworkConfig.ts +++ b/examples/minimal/packages/client-vanilla/src/mud/getNetworkConfig.ts @@ -25,7 +25,6 @@ export async function getNetworkConfig() { privateKey: getBurnerPrivateKey(), chainId, chain, - faucetServiceUrl: params.get("faucet") ?? chain.faucetUrl, worldAddress, initialBlockNumber, }; diff --git a/examples/minimal/packages/client-vanilla/src/mud/setupNetwork.ts b/examples/minimal/packages/client-vanilla/src/mud/setupNetwork.ts index 2260624657..00939f8380 100644 --- a/examples/minimal/packages/client-vanilla/src/mud/setupNetwork.ts +++ b/examples/minimal/packages/client-vanilla/src/mud/setupNetwork.ts @@ -1,5 +1,4 @@ -import { createPublicClient, fallback, webSocket, http, createWalletClient, Hex, parseEther, ClientConfig } from "viem"; -import { createFaucetService } from "@latticexyz/services/faucet"; +import { createPublicClient, fallback, webSocket, http, createWalletClient, Hex, ClientConfig } from "viem"; import { syncToZustand } from "@latticexyz/store-sync/zustand"; import { getNetworkConfig } from "./getNetworkConfig"; import IWorldAbi from "contracts/out/IWorld.sol/IWorld.abi.json"; @@ -41,30 +40,6 @@ export async function setupNetwork() { startBlock: BigInt(networkConfig.initialBlockNumber), }); - // Request drip from faucet - if (networkConfig.faucetServiceUrl) { - const address = burnerAccount.address; - console.info("[Dev Faucet]: Player address -> ", address); - - const faucet = createFaucetService(networkConfig.faucetServiceUrl); - - const requestDrip = async () => { - const balance = await publicClient.getBalance({ address }); - console.info(`[Dev Faucet]: Player balance -> ${balance}`); - const lowBalance = balance < parseEther("1"); - if (lowBalance) { - console.info("[Dev Faucet]: Balance is low, dripping funds to player"); - // Double drip - await faucet.dripDev({ address }); - await faucet.dripDev({ address }); - } - }; - - requestDrip(); - // Request a drip every 20 seconds - setInterval(requestDrip, 20000); - } - return { tables, useStore, diff --git a/examples/minimal/pnpm-lock.yaml b/examples/minimal/pnpm-lock.yaml index 5c4daabaec..da35948304 100644 --- a/examples/minimal/pnpm-lock.yaml +++ b/examples/minimal/pnpm-lock.yaml @@ -50,9 +50,6 @@ importers: '@latticexyz/schema-type': specifier: link:../../../../packages/schema-type version: link:../../../../packages/schema-type - '@latticexyz/services': - specifier: link:../../../../packages/services - version: link:../../../../packages/services '@latticexyz/store-sync': specifier: link:../../../../packages/store-sync version: link:../../../../packages/store-sync @@ -162,9 +159,6 @@ importers: '@latticexyz/schema-type': specifier: link:../../../../packages/schema-type version: link:../../../../packages/schema-type - '@latticexyz/services': - specifier: link:../../../../packages/services - version: link:../../../../packages/services '@latticexyz/store-sync': specifier: link:../../../../packages/store-sync version: link:../../../../packages/store-sync @@ -250,9 +244,6 @@ importers: '@latticexyz/schema-type': specifier: link:../../../../packages/schema-type version: link:../../../../packages/schema-type - '@latticexyz/services': - specifier: link:../../../../packages/services - version: link:../../../../packages/services '@latticexyz/store-sync': specifier: link:../../../../packages/store-sync version: link:../../../../packages/store-sync diff --git a/examples/multiple-accounts/packages/client/package.json b/examples/multiple-accounts/packages/client/package.json index 66cefb659d..1117fbe36d 100644 --- a/examples/multiple-accounts/packages/client/package.json +++ b/examples/multiple-accounts/packages/client/package.json @@ -15,7 +15,6 @@ "@latticexyz/dev-tools": "link:../../../../packages/dev-tools", "@latticexyz/react": "link:../../../../packages/react", "@latticexyz/schema-type": "link:../../../../packages/schema-type", - "@latticexyz/services": "link:../../../../packages/services", "@latticexyz/store-sync": "link:../../../../packages/store-sync", "@latticexyz/utils": "link:../../../../packages/utils", "@latticexyz/world": "link:../../../../packages/world", diff --git a/examples/multiple-accounts/packages/client/src/mud/getNetworkConfig.ts b/examples/multiple-accounts/packages/client/src/mud/getNetworkConfig.ts index 61ad962f25..2794583cca 100644 --- a/examples/multiple-accounts/packages/client/src/mud/getNetworkConfig.ts +++ b/examples/multiple-accounts/packages/client/src/mud/getNetworkConfig.ts @@ -6,8 +6,7 @@ /* * By default the template just creates a temporary wallet - * (called a burner wallet) and uses a faucet (on our test net) - * to get ETH for it. + * (called a burner wallet). * * See https://mud.dev/tutorials/minimal/deploy#wallet-managed-address * for how to use the user's own address instead. @@ -84,7 +83,6 @@ export async function getNetworkConfig() { privateKey: getBurnerPrivateKey(), chainId, chain, - faucetServiceUrl: params.get("faucet") ?? chain.faucetUrl, worldAddress, initialBlockNumber, }; diff --git a/examples/multiple-accounts/packages/client/src/mud/setupNetwork.ts b/examples/multiple-accounts/packages/client/src/mud/setupNetwork.ts index f401de4702..1b5c6c1b31 100644 --- a/examples/multiple-accounts/packages/client/src/mud/setupNetwork.ts +++ b/examples/multiple-accounts/packages/client/src/mud/setupNetwork.ts @@ -3,8 +3,7 @@ * (https://viem.sh/docs/getting-started.html). * This line imports the functions we need from it. */ -import { createPublicClient, fallback, webSocket, http, createWalletClient, Hex, parseEther, ClientConfig } from "viem"; -import { createFaucetService } from "@latticexyz/services/faucet"; +import { createPublicClient, fallback, webSocket, http, createWalletClient, Hex, ClientConfig } from "viem"; import { syncToZustand } from "@latticexyz/store-sync/zustand"; import { getNetworkConfig } from "./getNetworkConfig"; import IWorldAbi from "contracts/out/IWorld.sol/IWorld.abi.json"; @@ -77,34 +76,6 @@ export async function setupNetwork() { startBlock: BigInt(networkConfig.initialBlockNumber), }); - /* - * If there is a faucet, request (test) ETH if you have - * less than 1 ETH. Repeat every 20 seconds to ensure you don't - * run out. - */ - if (networkConfig.faucetServiceUrl) { - const address = burnerAccount.address; - console.info("[Dev Faucet]: Player address -> ", address); - - const faucet = createFaucetService(networkConfig.faucetServiceUrl); - - const requestDrip = async () => { - const balance = await publicClient.getBalance({ address }); - console.info(`[Dev Faucet]: Player balance -> ${balance}`); - const lowBalance = balance < parseEther("1"); - if (lowBalance) { - console.info("[Dev Faucet]: Balance is low, dripping funds to player"); - // Double drip - await faucet.dripDev({ address }); - await faucet.dripDev({ address }); - } - }; - - requestDrip(); - // Request a drip every 20 seconds - setInterval(requestDrip, 20000); - } - return { tables, useStore, diff --git a/package.json b/package.json index bb068ea10a..4c9ab7bce9 100644 --- a/package.json +++ b/package.json @@ -27,8 +27,8 @@ "release:publish": "pnpm install && pnpm build && changeset publish", "release:version": "changeset version && pnpm install --lockfile-only && pnpm run changelog:generate", "sort-package-json": "npx sort-package-json package.json 'packages/*/package.json' 'templates/*/package.json' 'templates/*/packages/*/package.json' 'examples/*/package.json' 'examples/*/packages/*/package.json' 'e2e/*/package.json' 'e2e/*/packages/*/package.json' 'docs/package.json'", - "test": "pnpm run --recursive --filter=!@latticexyz/services test", - "test:ci": "pnpm run --recursive --parallel --filter=!@latticexyz/services test:ci", + "test": "pnpm run --recursive test", + "test:ci": "pnpm run --recursive --parallel test:ci", "type-stats-repo": "attest stats packages/*" }, "lint-staged": { diff --git a/packages/cli/package.json b/packages/cli/package.json index a331159cf1..2897a06bd2 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -33,15 +33,12 @@ "@aws-sdk/client-kms": "^3.556.0", "@ethersproject/abi": "^5.7.0", "@ethersproject/providers": "^5.7.2", - "@improbable-eng/grpc-web": "^0.15.0", - "@improbable-eng/grpc-web-node-http-transport": "^0.15.0", "@latticexyz/abi-ts": "workspace:*", "@latticexyz/common": "workspace:*", "@latticexyz/config": "workspace:*", "@latticexyz/gas-report": "workspace:*", "@latticexyz/protocol-parser": "workspace:*", "@latticexyz/schema-type": "workspace:*", - "@latticexyz/services": "workspace:*", "@latticexyz/store": "workspace:*", "@latticexyz/utils": "workspace:*", "@latticexyz/world": "workspace:*", @@ -55,7 +52,6 @@ "ethers": "^5.7.2", "execa": "^7.0.0", "glob": "^8.0.3", - "nice-grpc-web": "^2.0.1", "openurl": "^1.1.1", "p-queue": "^7.4.1", "p-retry": "^5.1.2", diff --git a/packages/cli/src/commands/faucet.ts b/packages/cli/src/commands/faucet.ts deleted file mode 100644 index 173b4426a0..0000000000 --- a/packages/cli/src/commands/faucet.ts +++ /dev/null @@ -1,60 +0,0 @@ -import type { CommandModule } from "yargs"; -import { FaucetServiceDefinition } from "@latticexyz/services/faucet"; -import { createChannel, createClient } from "nice-grpc-web"; -import chalk from "chalk"; -import { NodeHttpTransport } from "@improbable-eng/grpc-web-node-http-transport"; - -type Options = { - dripDev?: boolean; - faucetUrl: string; - address: string; -}; - -/** - * Create a FaucetServiceClient - * @param url FaucetService URL - * @returns FaucetServiceClient - */ -function createFaucetService(url: string) { - return createClient(FaucetServiceDefinition, createChannel(url, NodeHttpTransport())); -} - -const commandModule: CommandModule = { - command: "faucet", - - describe: "Interact with a MUD faucet", - - builder(yargs) { - return yargs.options({ - dripDev: { - type: "boolean", - desc: "Request a drip from the dev endpoint (requires faucet to have dev mode enabled)", - default: true, - }, - faucetUrl: { - type: "string", - desc: "URL of the MUD faucet", - default: "https://faucet.testnet-mud-services.linfra.xyz", - }, - address: { - type: "string", - desc: "Ethereum address to fund", - required: true, - }, - }); - }, - - async handler({ dripDev, faucetUrl, address }) { - const faucet = createFaucetService(faucetUrl); - - if (dripDev) { - console.log(chalk.yellow("Dripping to", address)); - await faucet.dripDev({ address }); - console.log(chalk.yellow("Success")); - } - - process.exit(0); - }, -}; - -export default commandModule; diff --git a/packages/cli/src/commands/index.ts b/packages/cli/src/commands/index.ts index 7db9e57ed6..e70e0a89c3 100644 --- a/packages/cli/src/commands/index.ts +++ b/packages/cli/src/commands/index.ts @@ -5,7 +5,6 @@ import abiTs from "@latticexyz/abi-ts"; import build from "./build"; import devnode from "./devnode"; -import faucet from "./faucet"; import hello from "./hello"; import tablegen from "./tablegen"; import deploy from "./deploy"; @@ -21,7 +20,6 @@ export const commands: CommandModule[] = [ build, deploy, devnode, - faucet, gasReport as CommandModule, hello, tablegen, diff --git a/packages/services/.gitignore b/packages/services/.gitignore deleted file mode 100644 index 92beafb80d..0000000000 --- a/packages/services/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -i.DS_Store -/bin -/snapshots -docs -FaucetStore -/data -API -dist \ No newline at end of file diff --git a/packages/services/.npmignore b/packages/services/.npmignore deleted file mode 100644 index 6bb022b6b7..0000000000 --- a/packages/services/.npmignore +++ /dev/null @@ -1,7 +0,0 @@ -* - -!dist/** -!package.json -!README.md -!protobuf/** -!ts/** diff --git a/packages/services/CHANGELOG.md b/packages/services/CHANGELOG.md deleted file mode 100644 index b98b608b08..0000000000 --- a/packages/services/CHANGELOG.md +++ /dev/null @@ -1,490 +0,0 @@ -# Change Log - -## 2.0.9 - -## 2.0.8 - -## 2.0.7 - -## 2.0.6 - -## 2.0.5 - -## 2.0.4 - -## 2.0.3 - -## 2.0.2 - -## 2.0.1 - -## 2.0.0 - -### Major Changes - -- 433078c54: Reverse PackedCounter encoding, to optimize gas for bitshifts. - Ints are right-aligned, shifting using an index is straightforward if they are indexed right-to-left. - - - Previous encoding: (7 bytes | accumulator),(5 bytes | counter 1),...,(5 bytes | counter 5) - - New encoding: (5 bytes | counter 5),...,(5 bytes | counter 1),(7 bytes | accumulator) - -- 331f0d636: Move `createFaucetService` from `@latticexyz/network` to `@latticexyz/services/faucet`. - - ```diff - - import { createFaucetService } from "@latticexyz/network"; - + import { createFaucetService } from "@latticexyz/services/faucet"; - ``` - -### Patch Changes - -- 3236f799e: protocol-parser in Go -- 33f50f8a4: Fixed an issue where the TypeScript types for createFaucetService were not exported correctly from the @latticexyz/services package -- 80a26419f: The build phase of services now works on machines with older protobuf compilers -- 590542030: TS packages now generate their respective `.d.ts` type definition files for better compatibility when using MUD with `moduleResolution` set to `bundler` or `node16` and fixes issues around missing type declarations for dependent packages. -- 086be4ef4: fix a bug related to encoding negative bigints in MODE - -## 2.0.0-next.18 - -## 2.0.0-next.17 - -## 2.0.0-next.16 - -## 2.0.0-next.15 - -### Patch Changes - -- 59054203: TS packages now generate their respective `.d.ts` type definition files for better compatibility when using MUD with `moduleResolution` set to `bundler` or `node16` and fixes issues around missing type declarations for dependent packages. - -## 2.0.0-next.14 - -## 2.0.0-next.13 - -## 2.0.0-next.12 - -## 2.0.0-next.11 - -## 2.0.0-next.10 - -## 2.0.0-next.9 - -## 2.0.0-next.8 - -## 2.0.0-next.7 - -## 2.0.0-next.6 - -## 2.0.0-next.5 - -### Patch Changes - -- [#1377](https://github.com/latticexyz/mud/pull/1377) [`33f50f8a`](https://github.com/latticexyz/mud/commit/33f50f8a473398dcc19b17d10a17a552a82678c7) Thanks [@alvrs](https://github.com/alvrs)! - Fixed an issue where the TypeScript types for createFaucetService were not exported correctly from the @latticexyz/services package - -- [#1219](https://github.com/latticexyz/mud/pull/1219) [`80a26419`](https://github.com/latticexyz/mud/commit/80a26419f15177333b523bac5d09767487b4ffef) Thanks [@ludns](https://github.com/ludns)! - The build phase of services now works on machines with older protobuf compilers - -## 2.0.0-next.4 - -## 2.0.0-next.3 - -### Major Changes - -- [#1231](https://github.com/latticexyz/mud/pull/1231) [`433078c5`](https://github.com/latticexyz/mud/commit/433078c54c22fa1b4e32d7204fb41bd5f79ca1db) Thanks [@dk1a](https://github.com/dk1a)! - Reverse PackedCounter encoding, to optimize gas for bitshifts. - Ints are right-aligned, shifting using an index is straightforward if they are indexed right-to-left. - - - Previous encoding: (7 bytes | accumulator),(5 bytes | counter 1),...,(5 bytes | counter 5) - - New encoding: (5 bytes | counter 5),...,(5 bytes | counter 1),(7 bytes | accumulator) - -- [#1311](https://github.com/latticexyz/mud/pull/1311) [`331f0d63`](https://github.com/latticexyz/mud/commit/331f0d636f6f327824307570a63fb301d9b897d1) Thanks [@alvrs](https://github.com/alvrs)! - Move `createFaucetService` from `@latticexyz/network` to `@latticexyz/services/faucet`. - - ```diff - - import { createFaucetService } from "@latticexyz/network"; - + import { createFaucetService } from "@latticexyz/services/faucet"; - ``` - -## 2.0.0-next.2 - -## 2.0.0-next.1 - -### Patch Changes - -- [#1116](https://github.com/latticexyz/mud/pull/1116) [`3236f799`](https://github.com/latticexyz/mud/commit/3236f799e501be227da6e42e7b41a4928750115c) Thanks [@authcall](https://github.com/authcall)! - protocol-parser in Go - -## 2.0.0-next.0 - -### Patch Changes - -- [#1074](https://github.com/latticexyz/mud/pull/1074) [`086be4ef`](https://github.com/latticexyz/mud/commit/086be4ef4f3c1ecb3eac0e9554d7d4eb64531fc2) Thanks [@alvrs](https://github.com/alvrs)! - fix a bug related to encoding negative bigints in MODE - -All notable changes to this project will be documented in this file. -See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. - -# [1.42.0](https://github.com/latticexyz/mud/compare/v1.41.0...v1.42.0) (2023-04-13) - -### Features - -- mode mvp ([#492](https://github.com/latticexyz/mud/issues/492)) ([08a7baf](https://github.com/latticexyz/mud/commit/08a7baf760f227f2f513ed7da2078e0a41b1e928)) - -# [1.41.0](https://github.com/latticexyz/mud/compare/v1.40.0...v1.41.0) (2023-03-09) - -### Bug Fixes - -- **services:** fix protobuf imports ([#477](https://github.com/latticexyz/mud/issues/477)) ([3eda547](https://github.com/latticexyz/mud/commit/3eda547b6799b9899a14d48d022f7ec6460308e0)) - -# [1.40.0](https://github.com/latticexyz/mud/compare/v1.39.0...v1.40.0) (2023-03-03) - -### Features - -- v2 - add store, world and schema-type, cli table code generation ([#422](https://github.com/latticexyz/mud/issues/422)) ([cb731e0](https://github.com/latticexyz/mud/commit/cb731e0937e614bb316e6bc824813799559956c8)) - -### BREAKING CHANGES - -- This commit removes the deprecated `mud deploy` CLI command. Use `mud deploy-contracts` instead. - -# [1.39.0](https://github.com/latticexyz/mud/compare/v1.38.0...v1.39.0) (2023-02-22) - -**Note:** Version bump only for package @latticexyz/services - -# [1.38.0](https://github.com/latticexyz/mud/compare/v1.37.1...v1.38.0) (2023-02-22) - -**Note:** Version bump only for package @latticexyz/services - -## [1.37.1](https://github.com/latticexyz/mud/compare/v1.37.0...v1.37.1) (2023-02-17) - -**Note:** Version bump only for package @latticexyz/services - -# [1.37.0](https://github.com/latticexyz/mud/compare/v1.36.1...v1.37.0) (2023-02-16) - -### Reverts - -- Revert "chore(release): publish v1.37.0" ([c934f53](https://github.com/latticexyz/mud/commit/c934f5388c1e56f2fe6390fdda30f5b9b1ea1c20)) - -## [1.36.1](https://github.com/latticexyz/mud/compare/v1.36.0...v1.36.1) (2023-02-16) - -**Note:** Version bump only for package @latticexyz/services - -# [1.35.0](https://github.com/latticexyz/mud/compare/v1.34.0...v1.35.0) (2023-02-15) - -**Note:** Version bump only for package @latticexyz/services - -# [1.34.0](https://github.com/latticexyz/mud/compare/v1.33.1...v1.34.0) (2023-01-29) - -**Note:** Version bump only for package @latticexyz/services - -## [1.33.1](https://github.com/latticexyz/mud/compare/v1.33.0...v1.33.1) (2023-01-12) - -**Note:** Version bump only for package @latticexyz/services - -# [1.33.0](https://github.com/latticexyz/mud/compare/v1.32.0...v1.33.0) (2023-01-12) - -**Note:** Version bump only for package @latticexyz/services - -# [1.32.0](https://github.com/latticexyz/mud/compare/v1.31.3...v1.32.0) (2023-01-06) - -**Note:** Version bump only for package @latticexyz/services - -## [1.31.3](https://github.com/latticexyz/mud/compare/v1.31.2...v1.31.3) (2022-12-16) - -**Note:** Version bump only for package @latticexyz/services - -## [1.31.2](https://github.com/latticexyz/mud/compare/v1.31.1...v1.31.2) (2022-12-15) - -**Note:** Version bump only for package @latticexyz/services - -## [1.31.1](https://github.com/latticexyz/mud/compare/v1.31.0...v1.31.1) (2022-12-15) - -**Note:** Version bump only for package @latticexyz/services - -# [1.31.0](https://github.com/latticexyz/mud/compare/v1.30.1...v1.31.0) (2022-12-14) - -### Features - -- **services:** twitter verification / linking behind a flag ([#274](https://github.com/latticexyz/mud/issues/274)) ([60d4ae8](https://github.com/latticexyz/mud/commit/60d4ae853dca2485f37a39537e63c4eae72432da)) - -## [1.30.1](https://github.com/latticexyz/mud/compare/v1.30.0...v1.30.1) (2022-12-02) - -**Note:** Version bump only for package @latticexyz/services - -# [1.30.0](https://github.com/latticexyz/mud/compare/v1.29.0...v1.30.0) (2022-12-02) - -**Note:** Version bump only for package @latticexyz/services - -# [1.29.0](https://github.com/latticexyz/mud/compare/v1.28.1...v1.29.0) (2022-11-29) - -**Note:** Version bump only for package @latticexyz/services - -## [1.28.1](https://github.com/latticexyz/mud/compare/v1.28.0...v1.28.1) (2022-11-24) - -**Note:** Version bump only for package @latticexyz/services - -# [1.28.0](https://github.com/latticexyz/mud/compare/v1.27.1...v1.28.0) (2022-11-20) - -### Features - -- **network:** system call stream available in streaming service ([0244eb8](https://github.com/latticexyz/mud/commit/0244eb8d3ec1a7798136cf4ddefbd766cb830b8c)), closes [#254](https://github.com/latticexyz/mud/issues/254) - -# [1.26.0](https://github.com/latticexyz/mud/compare/v1.25.1...v1.26.0) (2022-11-07) - -### Features - -- **relay:** check message data doesn't exceed a configurable limit ([#195](https://github.com/latticexyz/mud/issues/195)) ([4e35ed3](https://github.com/latticexyz/mud/commit/4e35ed35eacbc68193d3fd561f085380294393e7)) -- **services:** admin endpoint on faucet ([#238](https://github.com/latticexyz/mud/issues/238)) ([282fd69](https://github.com/latticexyz/mud/commit/282fd695aafe493e692629cf74af764c8293a238)) - -## [1.25.1](https://github.com/latticexyz/mud/compare/v1.25.0...v1.25.1) (2022-11-03) - -**Note:** Version bump only for package @latticexyz/services - -# [1.25.0](https://github.com/latticexyz/mud/compare/v1.24.1...v1.25.0) (2022-11-03) - -**Note:** Version bump only for package @latticexyz/services - -## [1.24.1](https://github.com/latticexyz/mud/compare/v1.24.0...v1.24.1) (2022-10-29) - -**Note:** Version bump only for package @latticexyz/services - -# [1.24.0](https://github.com/latticexyz/mud/compare/v1.23.1...v1.24.0) (2022-10-28) - -### Features - -- v2 endpoint for pruned snapshot that returns entities as raw bytes ([#215](https://github.com/latticexyz/mud/issues/215)) ([28cce1e](https://github.com/latticexyz/mud/commit/28cce1e8a1240d72363fe786704e7fe976f7c995)) - -## [1.23.1](https://github.com/latticexyz/mud/compare/v1.23.0...v1.23.1) (2022-10-28) - -**Note:** Version bump only for package @latticexyz/services - -# [1.23.0](https://github.com/latticexyz/mud/compare/v1.22.0...v1.23.0) (2022-10-26) - -**Note:** Version bump only for package @latticexyz/services - -# [1.22.0](https://github.com/latticexyz/mud/compare/v1.21.0...v1.22.0) (2022-10-26) - -**Note:** Version bump only for package @latticexyz/services - -# [1.21.0](https://github.com/latticexyz/mud/compare/v1.20.0...v1.21.0) (2022-10-26) - -**Note:** Version bump only for package @latticexyz/services - -# [1.20.0](https://github.com/latticexyz/mud/compare/v1.19.0...v1.20.0) (2022-10-22) - -**Note:** Version bump only for package @latticexyz/services - -# [1.19.0](https://github.com/latticexyz/mud/compare/v1.18.0...v1.19.0) (2022-10-21) - -### Bug Fixes - -- checksum address / value when pruning snapshot ([#214](https://github.com/latticexyz/mud/issues/214)) ([64fd178](https://github.com/latticexyz/mud/commit/64fd178358ac05bb032cfd8cc1a1b87effa769ad)) - -# [1.18.0](https://github.com/latticexyz/mud/compare/v1.17.0...v1.18.0) (2022-10-21) - -### Features - -- service stabilizations, send ecs tx on drip, new pruned snapshot endpoint ([#204](https://github.com/latticexyz/mud/issues/204)) ([d0de185](https://github.com/latticexyz/mud/commit/d0de185ca7fa2418064706928853e5cd691bdde9)) - -# [1.17.0](https://github.com/latticexyz/mud/compare/v1.16.0...v1.17.0) (2022-10-19) - -### Features - -- allow specific snapshot chunk ratio ([#212](https://github.com/latticexyz/mud/issues/212)) ([827d972](https://github.com/latticexyz/mud/commit/827d972ac9ca11918520b5f040045dfb4cca1552)) - -# [1.16.0](https://github.com/latticexyz/mud/compare/v1.15.0...v1.16.0) (2022-10-19) - -**Note:** Version bump only for package @latticexyz/services - -# [1.15.0](https://github.com/latticexyz/mud/compare/v1.14.2...v1.15.0) (2022-10-18) - -**Note:** Version bump only for package @latticexyz/services - -## [1.14.2](https://github.com/latticexyz/mud/compare/v1.14.1...v1.14.2) (2022-10-18) - -**Note:** Version bump only for package @latticexyz/services - -## [1.14.1](https://github.com/latticexyz/mud/compare/v1.14.0...v1.14.1) (2022-10-18) - -**Note:** Version bump only for package @latticexyz/services - -# [1.14.0](https://github.com/latticexyz/mud/compare/v1.13.0...v1.14.0) (2022-10-18) - -**Note:** Version bump only for package @latticexyz/services - -# [1.13.0](https://github.com/latticexyz/mud/compare/v1.12.0...v1.13.0) (2022-10-15) - -**Note:** Version bump only for package @latticexyz/services - -# [1.12.0](https://github.com/latticexyz/mud/compare/v1.11.0...v1.12.0) (2022-10-12) - -### Features - -- fail without error on certain checks and other improvements ([#202](https://github.com/latticexyz/mud/issues/202)) ([f5d565e](https://github.com/latticexyz/mud/commit/f5d565e8c3b1dbd7a1c80a63b4365ce09354c6cf)) - -# [1.11.0](https://github.com/latticexyz/mud/compare/v1.10.0...v1.11.0) (2022-10-11) - -### Features - -- **relay:** check account balance is greater than a configured amount ([#194](https://github.com/latticexyz/mud/issues/194)) ([1cbbd5b](https://github.com/latticexyz/mud/commit/1cbbd5b3a000dff7998a970d93b2b80af44eba80)) - -# [1.10.0](https://github.com/latticexyz/mud/compare/v1.9.0...v1.10.0) (2022-10-11) - -**Note:** Version bump only for package @latticexyz/services - -# [1.9.0](https://github.com/latticexyz/mud/compare/v1.8.0...v1.9.0) (2022-10-11) - -### Features - -- **services:** grpc prometheus metrics ([#196](https://github.com/latticexyz/mud/issues/196)) ([33e8959](https://github.com/latticexyz/mud/commit/33e895988d1d17658709a9bf8c748a50283e0252)) - -# [1.8.0](https://github.com/latticexyz/mud/compare/v1.7.1...v1.8.0) (2022-10-07) - -### Bug Fixes - -- **relay:** open stream grpc endpoint not properly closing ([#187](https://github.com/latticexyz/mud/issues/187)) ([1db4a7d](https://github.com/latticexyz/mud/commit/1db4a7dd8fbc9220a75b6b3f6fb8d9b91d5cd605)) - -### Features - -- wss for stream service ([#186](https://github.com/latticexyz/mud/issues/186)) ([d4511ac](https://github.com/latticexyz/mud/commit/d4511acb1805ddacc71f83cdd9dc7858bd07aee1)) - -## [1.7.1](https://github.com/latticexyz/mud/compare/v1.7.0...v1.7.1) (2022-10-06) - -**Note:** Version bump only for package @latticexyz/services - -# [1.7.0](https://github.com/latticexyz/mud/compare/v1.6.0...v1.7.0) (2022-10-06) - -### Bug Fixes - -- **relay:** proper interval rate limiting and flag to control account balance check ([#181](https://github.com/latticexyz/mud/issues/181)) ([e84ae44](https://github.com/latticexyz/mud/commit/e84ae445962d5f3e432cfb4a7229a813eb47b681)) - -### Features - -- general service improvements ([#179](https://github.com/latticexyz/mud/issues/179)) ([e0dac83](https://github.com/latticexyz/mud/commit/e0dac83df6c4ab56c2db583e8d3d1d2541d1cd72)) -- **services:** service-side changes for health probes ([#183](https://github.com/latticexyz/mud/issues/183)) ([da4cf91](https://github.com/latticexyz/mud/commit/da4cf914527ba7c09588d7dd1ac8836bd4378534)) - -# [1.6.0](https://github.com/latticexyz/mud/compare/v1.5.1...v1.6.0) (2022-10-04) - -### Features - -- flag for sig verification, rate limiting of push, and check for balance when relaying ([#175](https://github.com/latticexyz/mud/issues/175)) ([0271ac9](https://github.com/latticexyz/mud/commit/0271ac9eb17fc1353e58ed11f6f6064e50956762)) - -## [1.5.1](https://github.com/latticexyz/mud/compare/v1.5.0...v1.5.1) (2022-10-03) - -**Note:** Version bump only for package @latticexyz/services - -# [1.5.0](https://github.com/latticexyz/mud/compare/v1.4.1...v1.5.0) (2022-10-03) - -### Features - -- add a stream rpc for message push ([#174](https://github.com/latticexyz/mud/issues/174)) ([e0aa956](https://github.com/latticexyz/mud/commit/e0aa956ac871064ecde87a07394525ca69e7f17d)) -- faucet re-drip after tweet, rpc to get time until next drip ([#173](https://github.com/latticexyz/mud/issues/173)) ([27b08fc](https://github.com/latticexyz/mud/commit/27b08fc99f278cd01e4c91f6f63387271bae3ced)) - -## [1.4.1](https://github.com/latticexyz/mud/compare/v1.4.0...v1.4.1) (2022-10-03) - -**Note:** Version bump only for package @latticexyz/services - -# [1.4.0](https://github.com/latticexyz/mud/compare/v1.3.0...v1.4.0) (2022-10-03) - -### Features - -- add signature verification for all client actions via relay service ([#167](https://github.com/latticexyz/mud/issues/167)) ([7920d6e](https://github.com/latticexyz/mud/commit/7920d6eec20f3a669cb3a1a9e39cd822e421961a)) -- faucet improvements ([#168](https://github.com/latticexyz/mud/issues/168)) ([29d0b91](https://github.com/latticexyz/mud/commit/29d0b91bca63324cc56854c710f1e7f779b4e553)) - -# [1.3.0](https://github.com/latticexyz/mud/compare/v1.2.0...v1.3.0) (2022-09-30) - -**Note:** Version bump only for package @latticexyz/services - -# [1.2.0](https://github.com/latticexyz/mud/compare/v1.1.0...v1.2.0) (2022-09-29) - -**Note:** Version bump only for package @latticexyz/services - -# [1.1.0](https://github.com/latticexyz/mud/compare/v1.0.0...v1.1.0) (2022-09-28) - -### Features - -- basic faucet service implementation ([#163](https://github.com/latticexyz/mud/issues/163)) ([3217176](https://github.com/latticexyz/mud/commit/3217176e65a66be581c1ab705eb9123cb2a812f9)) -- initial implementation of ecs relay service ([#157](https://github.com/latticexyz/mud/issues/157)) ([140aec3](https://github.com/latticexyz/mud/commit/140aec3e92269f8c79fe0ef5e6639ca0ff056282)) - -# [1.0.0](https://github.com/latticexyz/mud/compare/v0.16.4...v1.0.0) (2022-09-27) - -**Note:** Version bump only for package @latticexyz/services - -## [0.16.4](https://github.com/latticexyz/mud/compare/v0.16.3...v0.16.4) (2022-09-26) - -**Note:** Version bump only for package @latticexyz/services - -## [0.16.3](https://github.com/latticexyz/mud/compare/v0.16.2...v0.16.3) (2022-09-26) - -**Note:** Version bump only for package @latticexyz/services - -## [0.16.2](https://github.com/latticexyz/mud/compare/v0.16.1...v0.16.2) (2022-09-26) - -**Note:** Version bump only for package @latticexyz/services - -## [0.16.1](https://github.com/latticexyz/mud/compare/v0.16.0...v0.16.1) (2022-09-26) - -**Note:** Version bump only for package @latticexyz/services - -# [0.16.0](https://github.com/latticexyz/mud/compare/v0.15.1...v0.16.0) (2022-09-26) - -**Note:** Version bump only for package @latticexyz/services - -## [0.15.1](https://github.com/latticexyz/mud/compare/v0.15.0...v0.15.1) (2022-09-23) - -**Note:** Version bump only for package @latticexyz/services - -# [0.15.0](https://github.com/latticexyz/mud/compare/v0.14.2...v0.15.0) (2022-09-21) - -**Note:** Version bump only for package @latticexyz/services - -## [0.14.2](https://github.com/latticexyz/mud/compare/v0.14.1...v0.14.2) (2022-09-21) - -**Note:** Version bump only for package @latticexyz/services - -## [0.14.1](https://github.com/latticexyz/mud/compare/v0.14.0...v0.14.1) (2022-09-21) - -**Note:** Version bump only for package @latticexyz/services - -# [0.14.0](https://github.com/latticexyz/mud/compare/v0.13.0...v0.14.0) (2022-09-20) - -**Note:** Version bump only for package @latticexyz/services - -# [0.13.0](https://github.com/latticexyz/mud/compare/v0.12.0...v0.13.0) (2022-09-19) - -**Note:** Version bump only for package @latticexyz/services - -# [0.12.0](https://github.com/latticexyz/mud/compare/v0.11.1...v0.12.0) (2022-09-16) - -**Note:** Version bump only for package @latticexyz/services - -## [0.11.1](https://github.com/latticexyz/mud/compare/v0.11.0...v0.11.1) (2022-09-15) - -### Bug Fixes - -- do not run prepack multiple times when publishing ([4f6f4c3](https://github.com/latticexyz/mud/commit/4f6f4c35a53c105951b32a071e47a748b2502cda)) - -# [0.11.0](https://github.com/latticexyz/mud/compare/v0.10.0...v0.11.0) (2022-09-15) - -**Note:** Version bump only for package @latticexyz/services - -# [0.10.0](https://github.com/latticexyz/mud/compare/v0.9.0...v0.10.0) (2022-09-14) - -### Features - -- add chunk snapshot and stream service ([#139](https://github.com/latticexyz/mud/issues/139)) ([8c9d4b3](https://github.com/latticexyz/mud/commit/8c9d4b30ed70470ca8770565b6472359e0e0f2bc)) - -# [0.9.0](https://github.com/latticexyz/mud/compare/v0.8.1...v0.9.0) (2022-09-13) - -**Note:** Version bump only for package @latticexyz/services - -## [0.8.1](https://github.com/latticexyz/mud/compare/v0.8.0...v0.8.1) (2022-08-22) - -### Bug Fixes - -- start from initialBlockNumber, build settings, fix github actions, and other minor additions ([#137](https://github.com/latticexyz/mud/issues/137)) ([08eab5c](https://github.com/latticexyz/mud/commit/08eab5c6b0d99a9ffa8a315e16454ecc9306f410)) - -# [0.8.0](https://github.com/latticexyz/mud/compare/v0.7.0...v0.8.0) (2022-08-22) - -### Features - -- add mud.dev ([#133](https://github.com/latticexyz/mud/issues/133)) ([302588c](https://github.com/latticexyz/mud/commit/302588cbbab2803396b894bc006d13e6ac943da9)) -- integrate proto from services into network ([#131](https://github.com/latticexyz/mud/issues/131)) ([756fdb7](https://github.com/latticexyz/mud/commit/756fdb7cae6441e692088fd9cbbc8d9d327a70e0)) - -# [0.7.0](https://github.com/latticexyz/mud/compare/v0.6.0...v0.7.0) (2022-08-19) - -### Features - -- integrate mud services ([#130](https://github.com/latticexyz/mud/issues/130)) ([abe763c](https://github.com/latticexyz/mud/commit/abe763cc996b999c215498b780d1e35f95f4adb9)) diff --git a/packages/services/README.md b/packages/services/README.md deleted file mode 100644 index 0c45467d75..0000000000 --- a/packages/services/README.md +++ /dev/null @@ -1 +0,0 @@ -# DEPRECATED diff --git a/packages/services/package.json b/packages/services/package.json deleted file mode 100644 index 410089a37d..0000000000 --- a/packages/services/package.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "name": "@latticexyz/services", - "version": "2.0.9", - "description": "MUD services for enhanced interactions with on-chain ECS state", - "repository": { - "type": "git", - "url": "https://github.com/latticexyz/mud.git", - "directory": "packages/services" - }, - "license": "MIT", - "type": "module", - "exports": { - "./faucet": "./dist/faucet.js" - }, - "typesVersions": { - "*": { - "faucet": [ - "./ts/faucet/index.ts" - ] - } - }, - "scripts": { - "build": "pnpm run build:js", - "build:js": "tsup", - "dev": "tsup --watch", - "test": "echo 'no tests'", - "test:ci": "pnpm run test" - }, - "dependencies": { - "long": "^5.2.1", - "nice-grpc-common": "^2.0.2", - "nice-grpc-web": "^2.0.1", - "protobufjs": "^7.2.3" - }, - "devDependencies": { - "ts-proto": "^1.146.0", - "tsup": "^6.7.0" - } -} diff --git a/packages/services/proto/faucet.proto b/packages/services/proto/faucet.proto deleted file mode 100644 index e7b06a7260..0000000000 --- a/packages/services/proto/faucet.proto +++ /dev/null @@ -1,91 +0,0 @@ -syntax = "proto3"; -package faucet; - -option go_package = "protobuf/go/faucet"; - -message LinkedTwitterPair { - string username = 1; - string address = 2; -} - -message FaucetStore { - map addressToUsername = 1; - map usernameToAddress = 2; - - // User id/name/address to timestamp of latest drip. - map latestDrip = 3; - - // Global drip counter. - double totalDripCount = 4; -} - -// The Faucet Service definition. -service FaucetService { - rpc Drip (DripRequest) returns (DripResponse) {} - rpc DripDev (DripDevRequest) returns (DripResponse) {} - rpc DripVerifyTweet (DripRequest) returns (DripResponse) {} - - rpc TimeUntilDrip (DripRequest) returns (TimeUntilDripResponse) {} - - rpc GetLinkedTwitters (GetLinkedTwittersRequest) returns (GetLinkedTwittersResponse) {} - rpc GetLinkedTwitterForAddress (LinkedTwitterForAddressRequest) returns (LinkedTwitterForAddressResponse) {} - rpc GetLinkedAddressForTwitter (LinkedAddressForTwitterRequest) returns (LinkedAddressForTwitterResponse) {} - - // Admin utility endpoints for modifying state. Requires a signature with faucet private key. - rpc SetLinkedTwitter(SetLinkedTwitterRequest) returns (SetLinkedTwitterResponse) {} -} - -// Request for drip. -message DripRequest { - string username = 1; - string address = 2; -} - -// Request for drip to any address when running in dev mode. -message DripDevRequest { - string address = 1; -} - -// Response for drip request that contains the transaction hash of the drip tx and the ECS component set hash (if any). -message DripResponse { - string dripTxHash = 1; - string ecsTxHash = 2; -} - -// Response for the time until next drip request. -message TimeUntilDripResponse { - double timeUntilDripMinutes = 1; - double timeUntilDripSeconds = 2; -} - -message GetLinkedTwittersRequest {} - -message GetLinkedTwittersResponse { - repeated LinkedTwitterPair linkedTwitters = 1; -} - -message LinkedTwitterForAddressRequest { - string address = 1; -} - -message LinkedTwitterForAddressResponse { - string username = 1; -} - -message LinkedAddressForTwitterRequest { - string username = 1; -} - -message LinkedAddressForTwitterResponse { - string address = 1; -} - -message SetLinkedTwitterRequest { - string address = 1; - string username = 2; - string signature = 3; -} - -message SetLinkedTwitterResponse { - -} \ No newline at end of file diff --git a/packages/services/protobuf/ts/faucet/faucet.ts b/packages/services/protobuf/ts/faucet/faucet.ts deleted file mode 100644 index c60dc04035..0000000000 --- a/packages/services/protobuf/ts/faucet/faucet.ts +++ /dev/null @@ -1,1184 +0,0 @@ -/* eslint-disable */ -import Long from "long"; -import type { CallContext, CallOptions } from "nice-grpc-common"; -import _m0 from "protobufjs/minimal.js"; - -export const protobufPackage = "faucet"; - -export interface LinkedTwitterPair { - username: string; - address: string; -} - -export interface FaucetStore { - addressToUsername: { [key: string]: string }; - usernameToAddress: { [key: string]: string }; - /** User id/name/address to timestamp of latest drip. */ - latestDrip: { [key: string]: number }; - /** Global drip counter. */ - totalDripCount: number; -} - -export interface FaucetStore_AddressToUsernameEntry { - key: string; - value: string; -} - -export interface FaucetStore_UsernameToAddressEntry { - key: string; - value: string; -} - -export interface FaucetStore_LatestDripEntry { - key: string; - value: number; -} - -/** Request for drip. */ -export interface DripRequest { - username: string; - address: string; -} - -/** Request for drip to any address when running in dev mode. */ -export interface DripDevRequest { - address: string; -} - -/** Response for drip request that contains the transaction hash of the drip tx and the ECS component set hash (if any). */ -export interface DripResponse { - dripTxHash: string; - ecsTxHash: string; -} - -/** Response for the time until next drip request. */ -export interface TimeUntilDripResponse { - timeUntilDripMinutes: number; - timeUntilDripSeconds: number; -} - -export interface GetLinkedTwittersRequest {} - -export interface GetLinkedTwittersResponse { - linkedTwitters: LinkedTwitterPair[]; -} - -export interface LinkedTwitterForAddressRequest { - address: string; -} - -export interface LinkedTwitterForAddressResponse { - username: string; -} - -export interface LinkedAddressForTwitterRequest { - username: string; -} - -export interface LinkedAddressForTwitterResponse { - address: string; -} - -export interface SetLinkedTwitterRequest { - address: string; - username: string; - signature: string; -} - -export interface SetLinkedTwitterResponse {} - -function createBaseLinkedTwitterPair(): LinkedTwitterPair { - return { username: "", address: "" }; -} - -export const LinkedTwitterPair = { - encode(message: LinkedTwitterPair, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.username !== "") { - writer.uint32(10).string(message.username); - } - if (message.address !== "") { - writer.uint32(18).string(message.address); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): LinkedTwitterPair { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseLinkedTwitterPair(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag != 10) { - break; - } - - message.username = reader.string(); - continue; - case 2: - if (tag != 18) { - break; - } - - message.address = reader.string(); - continue; - } - if ((tag & 7) == 4 || tag == 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - create(base?: DeepPartial): LinkedTwitterPair { - return LinkedTwitterPair.fromPartial(base ?? {}); - }, - - fromPartial(object: DeepPartial): LinkedTwitterPair { - const message = createBaseLinkedTwitterPair(); - message.username = object.username ?? ""; - message.address = object.address ?? ""; - return message; - }, -}; - -function createBaseFaucetStore(): FaucetStore { - return { addressToUsername: {}, usernameToAddress: {}, latestDrip: {}, totalDripCount: 0 }; -} - -export const FaucetStore = { - encode(message: FaucetStore, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - Object.entries(message.addressToUsername).forEach(([key, value]) => { - FaucetStore_AddressToUsernameEntry.encode({ key: key as any, value }, writer.uint32(10).fork()).ldelim(); - }); - Object.entries(message.usernameToAddress).forEach(([key, value]) => { - FaucetStore_UsernameToAddressEntry.encode({ key: key as any, value }, writer.uint32(18).fork()).ldelim(); - }); - Object.entries(message.latestDrip).forEach(([key, value]) => { - FaucetStore_LatestDripEntry.encode({ key: key as any, value }, writer.uint32(26).fork()).ldelim(); - }); - if (message.totalDripCount !== 0) { - writer.uint32(33).double(message.totalDripCount); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): FaucetStore { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseFaucetStore(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag != 10) { - break; - } - - const entry1 = FaucetStore_AddressToUsernameEntry.decode(reader, reader.uint32()); - if (entry1.value !== undefined) { - message.addressToUsername[entry1.key] = entry1.value; - } - continue; - case 2: - if (tag != 18) { - break; - } - - const entry2 = FaucetStore_UsernameToAddressEntry.decode(reader, reader.uint32()); - if (entry2.value !== undefined) { - message.usernameToAddress[entry2.key] = entry2.value; - } - continue; - case 3: - if (tag != 26) { - break; - } - - const entry3 = FaucetStore_LatestDripEntry.decode(reader, reader.uint32()); - if (entry3.value !== undefined) { - message.latestDrip[entry3.key] = entry3.value; - } - continue; - case 4: - if (tag != 33) { - break; - } - - message.totalDripCount = reader.double(); - continue; - } - if ((tag & 7) == 4 || tag == 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - create(base?: DeepPartial): FaucetStore { - return FaucetStore.fromPartial(base ?? {}); - }, - - fromPartial(object: DeepPartial): FaucetStore { - const message = createBaseFaucetStore(); - message.addressToUsername = Object.entries(object.addressToUsername ?? {}).reduce<{ [key: string]: string }>( - (acc, [key, value]) => { - if (value !== undefined) { - acc[key] = String(value); - } - return acc; - }, - {}, - ); - message.usernameToAddress = Object.entries(object.usernameToAddress ?? {}).reduce<{ [key: string]: string }>( - (acc, [key, value]) => { - if (value !== undefined) { - acc[key] = String(value); - } - return acc; - }, - {}, - ); - message.latestDrip = Object.entries(object.latestDrip ?? {}).reduce<{ [key: string]: number }>( - (acc, [key, value]) => { - if (value !== undefined) { - acc[key] = Number(value); - } - return acc; - }, - {}, - ); - message.totalDripCount = object.totalDripCount ?? 0; - return message; - }, -}; - -function createBaseFaucetStore_AddressToUsernameEntry(): FaucetStore_AddressToUsernameEntry { - return { key: "", value: "" }; -} - -export const FaucetStore_AddressToUsernameEntry = { - encode(message: FaucetStore_AddressToUsernameEntry, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.key !== "") { - writer.uint32(10).string(message.key); - } - if (message.value !== "") { - writer.uint32(18).string(message.value); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): FaucetStore_AddressToUsernameEntry { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseFaucetStore_AddressToUsernameEntry(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag != 10) { - break; - } - - message.key = reader.string(); - continue; - case 2: - if (tag != 18) { - break; - } - - message.value = reader.string(); - continue; - } - if ((tag & 7) == 4 || tag == 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - create(base?: DeepPartial): FaucetStore_AddressToUsernameEntry { - return FaucetStore_AddressToUsernameEntry.fromPartial(base ?? {}); - }, - - fromPartial(object: DeepPartial): FaucetStore_AddressToUsernameEntry { - const message = createBaseFaucetStore_AddressToUsernameEntry(); - message.key = object.key ?? ""; - message.value = object.value ?? ""; - return message; - }, -}; - -function createBaseFaucetStore_UsernameToAddressEntry(): FaucetStore_UsernameToAddressEntry { - return { key: "", value: "" }; -} - -export const FaucetStore_UsernameToAddressEntry = { - encode(message: FaucetStore_UsernameToAddressEntry, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.key !== "") { - writer.uint32(10).string(message.key); - } - if (message.value !== "") { - writer.uint32(18).string(message.value); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): FaucetStore_UsernameToAddressEntry { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseFaucetStore_UsernameToAddressEntry(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag != 10) { - break; - } - - message.key = reader.string(); - continue; - case 2: - if (tag != 18) { - break; - } - - message.value = reader.string(); - continue; - } - if ((tag & 7) == 4 || tag == 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - create(base?: DeepPartial): FaucetStore_UsernameToAddressEntry { - return FaucetStore_UsernameToAddressEntry.fromPartial(base ?? {}); - }, - - fromPartial(object: DeepPartial): FaucetStore_UsernameToAddressEntry { - const message = createBaseFaucetStore_UsernameToAddressEntry(); - message.key = object.key ?? ""; - message.value = object.value ?? ""; - return message; - }, -}; - -function createBaseFaucetStore_LatestDripEntry(): FaucetStore_LatestDripEntry { - return { key: "", value: 0 }; -} - -export const FaucetStore_LatestDripEntry = { - encode(message: FaucetStore_LatestDripEntry, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.key !== "") { - writer.uint32(10).string(message.key); - } - if (message.value !== 0) { - writer.uint32(16).int64(message.value); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): FaucetStore_LatestDripEntry { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseFaucetStore_LatestDripEntry(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag != 10) { - break; - } - - message.key = reader.string(); - continue; - case 2: - if (tag != 16) { - break; - } - - message.value = longToNumber(reader.int64() as Long); - continue; - } - if ((tag & 7) == 4 || tag == 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - create(base?: DeepPartial): FaucetStore_LatestDripEntry { - return FaucetStore_LatestDripEntry.fromPartial(base ?? {}); - }, - - fromPartial(object: DeepPartial): FaucetStore_LatestDripEntry { - const message = createBaseFaucetStore_LatestDripEntry(); - message.key = object.key ?? ""; - message.value = object.value ?? 0; - return message; - }, -}; - -function createBaseDripRequest(): DripRequest { - return { username: "", address: "" }; -} - -export const DripRequest = { - encode(message: DripRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.username !== "") { - writer.uint32(10).string(message.username); - } - if (message.address !== "") { - writer.uint32(18).string(message.address); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): DripRequest { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseDripRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag != 10) { - break; - } - - message.username = reader.string(); - continue; - case 2: - if (tag != 18) { - break; - } - - message.address = reader.string(); - continue; - } - if ((tag & 7) == 4 || tag == 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - create(base?: DeepPartial): DripRequest { - return DripRequest.fromPartial(base ?? {}); - }, - - fromPartial(object: DeepPartial): DripRequest { - const message = createBaseDripRequest(); - message.username = object.username ?? ""; - message.address = object.address ?? ""; - return message; - }, -}; - -function createBaseDripDevRequest(): DripDevRequest { - return { address: "" }; -} - -export const DripDevRequest = { - encode(message: DripDevRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): DripDevRequest { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseDripDevRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag != 10) { - break; - } - - message.address = reader.string(); - continue; - } - if ((tag & 7) == 4 || tag == 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - create(base?: DeepPartial): DripDevRequest { - return DripDevRequest.fromPartial(base ?? {}); - }, - - fromPartial(object: DeepPartial): DripDevRequest { - const message = createBaseDripDevRequest(); - message.address = object.address ?? ""; - return message; - }, -}; - -function createBaseDripResponse(): DripResponse { - return { dripTxHash: "", ecsTxHash: "" }; -} - -export const DripResponse = { - encode(message: DripResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.dripTxHash !== "") { - writer.uint32(10).string(message.dripTxHash); - } - if (message.ecsTxHash !== "") { - writer.uint32(18).string(message.ecsTxHash); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): DripResponse { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseDripResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag != 10) { - break; - } - - message.dripTxHash = reader.string(); - continue; - case 2: - if (tag != 18) { - break; - } - - message.ecsTxHash = reader.string(); - continue; - } - if ((tag & 7) == 4 || tag == 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - create(base?: DeepPartial): DripResponse { - return DripResponse.fromPartial(base ?? {}); - }, - - fromPartial(object: DeepPartial): DripResponse { - const message = createBaseDripResponse(); - message.dripTxHash = object.dripTxHash ?? ""; - message.ecsTxHash = object.ecsTxHash ?? ""; - return message; - }, -}; - -function createBaseTimeUntilDripResponse(): TimeUntilDripResponse { - return { timeUntilDripMinutes: 0, timeUntilDripSeconds: 0 }; -} - -export const TimeUntilDripResponse = { - encode(message: TimeUntilDripResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.timeUntilDripMinutes !== 0) { - writer.uint32(9).double(message.timeUntilDripMinutes); - } - if (message.timeUntilDripSeconds !== 0) { - writer.uint32(17).double(message.timeUntilDripSeconds); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): TimeUntilDripResponse { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseTimeUntilDripResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag != 9) { - break; - } - - message.timeUntilDripMinutes = reader.double(); - continue; - case 2: - if (tag != 17) { - break; - } - - message.timeUntilDripSeconds = reader.double(); - continue; - } - if ((tag & 7) == 4 || tag == 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - create(base?: DeepPartial): TimeUntilDripResponse { - return TimeUntilDripResponse.fromPartial(base ?? {}); - }, - - fromPartial(object: DeepPartial): TimeUntilDripResponse { - const message = createBaseTimeUntilDripResponse(); - message.timeUntilDripMinutes = object.timeUntilDripMinutes ?? 0; - message.timeUntilDripSeconds = object.timeUntilDripSeconds ?? 0; - return message; - }, -}; - -function createBaseGetLinkedTwittersRequest(): GetLinkedTwittersRequest { - return {}; -} - -export const GetLinkedTwittersRequest = { - encode(_: GetLinkedTwittersRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): GetLinkedTwittersRequest { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGetLinkedTwittersRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - } - if ((tag & 7) == 4 || tag == 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - create(base?: DeepPartial): GetLinkedTwittersRequest { - return GetLinkedTwittersRequest.fromPartial(base ?? {}); - }, - - fromPartial(_: DeepPartial): GetLinkedTwittersRequest { - const message = createBaseGetLinkedTwittersRequest(); - return message; - }, -}; - -function createBaseGetLinkedTwittersResponse(): GetLinkedTwittersResponse { - return { linkedTwitters: [] }; -} - -export const GetLinkedTwittersResponse = { - encode(message: GetLinkedTwittersResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - for (const v of message.linkedTwitters) { - LinkedTwitterPair.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): GetLinkedTwittersResponse { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGetLinkedTwittersResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag != 10) { - break; - } - - message.linkedTwitters.push(LinkedTwitterPair.decode(reader, reader.uint32())); - continue; - } - if ((tag & 7) == 4 || tag == 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - create(base?: DeepPartial): GetLinkedTwittersResponse { - return GetLinkedTwittersResponse.fromPartial(base ?? {}); - }, - - fromPartial(object: DeepPartial): GetLinkedTwittersResponse { - const message = createBaseGetLinkedTwittersResponse(); - message.linkedTwitters = object.linkedTwitters?.map((e) => LinkedTwitterPair.fromPartial(e)) || []; - return message; - }, -}; - -function createBaseLinkedTwitterForAddressRequest(): LinkedTwitterForAddressRequest { - return { address: "" }; -} - -export const LinkedTwitterForAddressRequest = { - encode(message: LinkedTwitterForAddressRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): LinkedTwitterForAddressRequest { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseLinkedTwitterForAddressRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag != 10) { - break; - } - - message.address = reader.string(); - continue; - } - if ((tag & 7) == 4 || tag == 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - create(base?: DeepPartial): LinkedTwitterForAddressRequest { - return LinkedTwitterForAddressRequest.fromPartial(base ?? {}); - }, - - fromPartial(object: DeepPartial): LinkedTwitterForAddressRequest { - const message = createBaseLinkedTwitterForAddressRequest(); - message.address = object.address ?? ""; - return message; - }, -}; - -function createBaseLinkedTwitterForAddressResponse(): LinkedTwitterForAddressResponse { - return { username: "" }; -} - -export const LinkedTwitterForAddressResponse = { - encode(message: LinkedTwitterForAddressResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.username !== "") { - writer.uint32(10).string(message.username); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): LinkedTwitterForAddressResponse { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseLinkedTwitterForAddressResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag != 10) { - break; - } - - message.username = reader.string(); - continue; - } - if ((tag & 7) == 4 || tag == 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - create(base?: DeepPartial): LinkedTwitterForAddressResponse { - return LinkedTwitterForAddressResponse.fromPartial(base ?? {}); - }, - - fromPartial(object: DeepPartial): LinkedTwitterForAddressResponse { - const message = createBaseLinkedTwitterForAddressResponse(); - message.username = object.username ?? ""; - return message; - }, -}; - -function createBaseLinkedAddressForTwitterRequest(): LinkedAddressForTwitterRequest { - return { username: "" }; -} - -export const LinkedAddressForTwitterRequest = { - encode(message: LinkedAddressForTwitterRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.username !== "") { - writer.uint32(10).string(message.username); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): LinkedAddressForTwitterRequest { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseLinkedAddressForTwitterRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag != 10) { - break; - } - - message.username = reader.string(); - continue; - } - if ((tag & 7) == 4 || tag == 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - create(base?: DeepPartial): LinkedAddressForTwitterRequest { - return LinkedAddressForTwitterRequest.fromPartial(base ?? {}); - }, - - fromPartial(object: DeepPartial): LinkedAddressForTwitterRequest { - const message = createBaseLinkedAddressForTwitterRequest(); - message.username = object.username ?? ""; - return message; - }, -}; - -function createBaseLinkedAddressForTwitterResponse(): LinkedAddressForTwitterResponse { - return { address: "" }; -} - -export const LinkedAddressForTwitterResponse = { - encode(message: LinkedAddressForTwitterResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): LinkedAddressForTwitterResponse { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseLinkedAddressForTwitterResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag != 10) { - break; - } - - message.address = reader.string(); - continue; - } - if ((tag & 7) == 4 || tag == 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - create(base?: DeepPartial): LinkedAddressForTwitterResponse { - return LinkedAddressForTwitterResponse.fromPartial(base ?? {}); - }, - - fromPartial(object: DeepPartial): LinkedAddressForTwitterResponse { - const message = createBaseLinkedAddressForTwitterResponse(); - message.address = object.address ?? ""; - return message; - }, -}; - -function createBaseSetLinkedTwitterRequest(): SetLinkedTwitterRequest { - return { address: "", username: "", signature: "" }; -} - -export const SetLinkedTwitterRequest = { - encode(message: SetLinkedTwitterRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - if (message.username !== "") { - writer.uint32(18).string(message.username); - } - if (message.signature !== "") { - writer.uint32(26).string(message.signature); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): SetLinkedTwitterRequest { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSetLinkedTwitterRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag != 10) { - break; - } - - message.address = reader.string(); - continue; - case 2: - if (tag != 18) { - break; - } - - message.username = reader.string(); - continue; - case 3: - if (tag != 26) { - break; - } - - message.signature = reader.string(); - continue; - } - if ((tag & 7) == 4 || tag == 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - create(base?: DeepPartial): SetLinkedTwitterRequest { - return SetLinkedTwitterRequest.fromPartial(base ?? {}); - }, - - fromPartial(object: DeepPartial): SetLinkedTwitterRequest { - const message = createBaseSetLinkedTwitterRequest(); - message.address = object.address ?? ""; - message.username = object.username ?? ""; - message.signature = object.signature ?? ""; - return message; - }, -}; - -function createBaseSetLinkedTwitterResponse(): SetLinkedTwitterResponse { - return {}; -} - -export const SetLinkedTwitterResponse = { - encode(_: SetLinkedTwitterResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): SetLinkedTwitterResponse { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSetLinkedTwitterResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - } - if ((tag & 7) == 4 || tag == 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - create(base?: DeepPartial): SetLinkedTwitterResponse { - return SetLinkedTwitterResponse.fromPartial(base ?? {}); - }, - - fromPartial(_: DeepPartial): SetLinkedTwitterResponse { - const message = createBaseSetLinkedTwitterResponse(); - return message; - }, -}; - -/** The Faucet Service definition. */ -export type FaucetServiceDefinition = typeof FaucetServiceDefinition; -export const FaucetServiceDefinition = { - name: "FaucetService", - fullName: "faucet.FaucetService", - methods: { - drip: { - name: "Drip", - requestType: DripRequest, - requestStream: false, - responseType: DripResponse, - responseStream: false, - options: {}, - }, - dripDev: { - name: "DripDev", - requestType: DripDevRequest, - requestStream: false, - responseType: DripResponse, - responseStream: false, - options: {}, - }, - dripVerifyTweet: { - name: "DripVerifyTweet", - requestType: DripRequest, - requestStream: false, - responseType: DripResponse, - responseStream: false, - options: {}, - }, - timeUntilDrip: { - name: "TimeUntilDrip", - requestType: DripRequest, - requestStream: false, - responseType: TimeUntilDripResponse, - responseStream: false, - options: {}, - }, - getLinkedTwitters: { - name: "GetLinkedTwitters", - requestType: GetLinkedTwittersRequest, - requestStream: false, - responseType: GetLinkedTwittersResponse, - responseStream: false, - options: {}, - }, - getLinkedTwitterForAddress: { - name: "GetLinkedTwitterForAddress", - requestType: LinkedTwitterForAddressRequest, - requestStream: false, - responseType: LinkedTwitterForAddressResponse, - responseStream: false, - options: {}, - }, - getLinkedAddressForTwitter: { - name: "GetLinkedAddressForTwitter", - requestType: LinkedAddressForTwitterRequest, - requestStream: false, - responseType: LinkedAddressForTwitterResponse, - responseStream: false, - options: {}, - }, - /** Admin utility endpoints for modifying state. Requires a signature with faucet private key. */ - setLinkedTwitter: { - name: "SetLinkedTwitter", - requestType: SetLinkedTwitterRequest, - requestStream: false, - responseType: SetLinkedTwitterResponse, - responseStream: false, - options: {}, - }, - }, -} as const; - -export interface FaucetServiceImplementation { - drip(request: DripRequest, context: CallContext & CallContextExt): Promise>; - dripDev(request: DripDevRequest, context: CallContext & CallContextExt): Promise>; - dripVerifyTweet(request: DripRequest, context: CallContext & CallContextExt): Promise>; - timeUntilDrip( - request: DripRequest, - context: CallContext & CallContextExt, - ): Promise>; - getLinkedTwitters( - request: GetLinkedTwittersRequest, - context: CallContext & CallContextExt, - ): Promise>; - getLinkedTwitterForAddress( - request: LinkedTwitterForAddressRequest, - context: CallContext & CallContextExt, - ): Promise>; - getLinkedAddressForTwitter( - request: LinkedAddressForTwitterRequest, - context: CallContext & CallContextExt, - ): Promise>; - /** Admin utility endpoints for modifying state. Requires a signature with faucet private key. */ - setLinkedTwitter( - request: SetLinkedTwitterRequest, - context: CallContext & CallContextExt, - ): Promise>; -} - -export interface FaucetServiceClient { - drip(request: DeepPartial, options?: CallOptions & CallOptionsExt): Promise; - dripDev(request: DeepPartial, options?: CallOptions & CallOptionsExt): Promise; - dripVerifyTweet(request: DeepPartial, options?: CallOptions & CallOptionsExt): Promise; - timeUntilDrip( - request: DeepPartial, - options?: CallOptions & CallOptionsExt, - ): Promise; - getLinkedTwitters( - request: DeepPartial, - options?: CallOptions & CallOptionsExt, - ): Promise; - getLinkedTwitterForAddress( - request: DeepPartial, - options?: CallOptions & CallOptionsExt, - ): Promise; - getLinkedAddressForTwitter( - request: DeepPartial, - options?: CallOptions & CallOptionsExt, - ): Promise; - /** Admin utility endpoints for modifying state. Requires a signature with faucet private key. */ - setLinkedTwitter( - request: DeepPartial, - options?: CallOptions & CallOptionsExt, - ): Promise; -} - -declare var self: any | undefined; -declare var window: any | undefined; -declare var global: any | undefined; -var tsProtoGlobalThis: any = (() => { - if (typeof globalThis !== "undefined") { - return globalThis; - } - if (typeof self !== "undefined") { - return self; - } - if (typeof window !== "undefined") { - return window; - } - if (typeof global !== "undefined") { - return global; - } - throw "Unable to locate global object"; -})(); - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin - ? T - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToNumber(long: Long): number { - if (long.gt(Number.MAX_SAFE_INTEGER)) { - throw new tsProtoGlobalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - return long.toNumber(); -} - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} diff --git a/packages/services/protobuf/ts/index.ts b/packages/services/protobuf/ts/index.ts deleted file mode 100644 index 47768c3677..0000000000 --- a/packages/services/protobuf/ts/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * as Faucet from "./faucet/faucet"; diff --git a/packages/services/ts/faucet/createFaucetService.ts b/packages/services/ts/faucet/createFaucetService.ts deleted file mode 100644 index ea0b1c565b..0000000000 --- a/packages/services/ts/faucet/createFaucetService.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { FaucetServiceDefinition } from "../../protobuf/ts/faucet/faucet"; -import { createChannel, createClient, RawClient } from "nice-grpc-web"; -import { FromTsProtoServiceDefinition } from "nice-grpc-web/lib/service-definitions/ts-proto"; - -/** - * Create a FaucetServiceClient - * @param url FaucetService URL - * @returns FaucetServiceClient - */ -export function createFaucetService( - url: string, -): RawClient> { - return createClient(FaucetServiceDefinition, createChannel(url)); -} diff --git a/packages/services/ts/faucet/index.ts b/packages/services/ts/faucet/index.ts deleted file mode 100644 index 7eabecd978..0000000000 --- a/packages/services/ts/faucet/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from "../../protobuf/ts/faucet/faucet"; -export { createFaucetService } from "./createFaucetService"; diff --git a/packages/services/tsconfig.json b/packages/services/tsconfig.json deleted file mode 100644 index 41ba198034..0000000000 --- a/packages/services/tsconfig.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "compilerOptions": { - "target": "es2020", - "module": "esnext", - "moduleResolution": "node", - "isolatedModules": true, - "allowSyntheticDefaultImports": true, - "esModuleInterop": true, - "skipLibCheck": true - } -} diff --git a/packages/services/tsup.config.ts b/packages/services/tsup.config.ts deleted file mode 100644 index 92aa8b823d..0000000000 --- a/packages/services/tsup.config.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { defineConfig } from "tsup"; - -export default defineConfig({ - entry: { - faucet: "ts/faucet/index.ts", - }, - target: "esnext", - format: ["esm"], - dts: !process.env.TSUP_SKIP_DTS, - sourcemap: true, - clean: true, -}); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b3a13810f0..c9ce5b4c7c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -139,12 +139,6 @@ importers: '@ethersproject/providers': specifier: ^5.7.2 version: 5.7.2 - '@improbable-eng/grpc-web': - specifier: ^0.15.0 - version: 0.15.0(google-protobuf@3.21.2) - '@improbable-eng/grpc-web-node-http-transport': - specifier: ^0.15.0 - version: 0.15.0(@improbable-eng/grpc-web@0.15.0) '@latticexyz/abi-ts': specifier: workspace:* version: link:../abi-ts @@ -163,9 +157,6 @@ importers: '@latticexyz/schema-type': specifier: workspace:* version: link:../schema-type - '@latticexyz/services': - specifier: workspace:* - version: link:../services '@latticexyz/store': specifier: workspace:* version: link:../store @@ -205,9 +196,6 @@ importers: glob: specifier: ^8.0.3 version: 8.0.3 - nice-grpc-web: - specifier: ^2.0.1 - version: 2.0.1(google-protobuf@3.21.2) openurl: specifier: ^1.1.1 version: 1.1.1 @@ -707,28 +695,6 @@ importers: specifier: 0.34.6 version: 0.34.6(jsdom@22.1.0) - packages/services: - dependencies: - long: - specifier: ^5.2.1 - version: 5.2.1 - nice-grpc-common: - specifier: ^2.0.2 - version: 2.0.2 - nice-grpc-web: - specifier: ^2.0.1 - version: 2.0.1(google-protobuf@3.21.2) - protobufjs: - specifier: ^7.2.3 - version: 7.2.3 - devDependencies: - ts-proto: - specifier: ^1.146.0 - version: 1.146.0 - tsup: - specifier: ^6.7.0 - version: 6.7.0(postcss@8.4.23)(typescript@5.4.2) - packages/solhint-config-mud: devDependencies: tsup: @@ -3336,23 +3302,6 @@ packages: resolution: {integrity: sha512-6EwiSjwWYP7pTckG6I5eyFANjPhmPjUX9JRLUSfNPC7FX7zK9gyZAfUEaECL6ALTpGX5AjnBq3C9XmVWPitNpw==} dev: true - /@improbable-eng/grpc-web-node-http-transport@0.15.0(@improbable-eng/grpc-web@0.15.0): - resolution: {integrity: sha512-HLgJfVolGGpjc9DWPhmMmXJx8YGzkek7jcCFO1YYkSOoO81MWRZentPOd/JiKiZuU08wtc4BG+WNuGzsQB5jZA==} - peerDependencies: - '@improbable-eng/grpc-web': '>=0.13.0' - dependencies: - '@improbable-eng/grpc-web': 0.15.0(google-protobuf@3.21.2) - dev: false - - /@improbable-eng/grpc-web@0.15.0(google-protobuf@3.21.2): - resolution: {integrity: sha512-ERft9/0/8CmYalqOVnJnpdDry28q+j+nAlFFARdjyxXDJ+Mhgv9+F600QC8BR9ygOfrXRlAk6CvST2j+JCpQPg==} - peerDependencies: - google-protobuf: ^3.14.0 - dependencies: - browser-headers: 0.4.1 - google-protobuf: 3.21.2 - dev: false - /@istanbuljs/load-nyc-config@1.1.0: resolution: {integrity: sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==} engines: {node: '>=8'} @@ -3781,39 +3730,6 @@ packages: dev: true optional: true - /@protobufjs/aspromise@1.1.2: - resolution: {integrity: sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ==} - - /@protobufjs/base64@1.1.2: - resolution: {integrity: sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg==} - - /@protobufjs/codegen@2.0.4: - resolution: {integrity: sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg==} - - /@protobufjs/eventemitter@1.1.0: - resolution: {integrity: sha512-j9ednRT81vYJ9OfVuXG6ERSTdEL1xVsNgqpkxMsbIabzSo3goCjDIveeGv5d03om39ML71RdmrGNjG5SReBP/Q==} - - /@protobufjs/fetch@1.1.0: - resolution: {integrity: sha512-lljVXpqXebpsijW71PZaCYeIcE5on1w5DlQy5WH6GLbFryLUrBD4932W/E2BSpfRJWseIL4v/KPgBFxDOIdKpQ==} - dependencies: - '@protobufjs/aspromise': 1.1.2 - '@protobufjs/inquire': 1.1.0 - - /@protobufjs/float@1.0.2: - resolution: {integrity: sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ==} - - /@protobufjs/inquire@1.1.0: - resolution: {integrity: sha512-kdSefcPdruJiFMVSbn801t4vFK7KB/5gd2fYvrxhuJYg8ILrmn9SKSX2tZdV6V+ksulWqS7aXjBcRXl3wHoD9Q==} - - /@protobufjs/path@1.1.2: - resolution: {integrity: sha512-6JOcJ5Tm08dOHAbdR3GrvP+yUUfkjG5ePsHYczMFLq3ZmMkAD98cDgcT2iA1lJ9NVwFd4tH/iSSoe44YWkltEA==} - - /@protobufjs/pool@1.1.0: - resolution: {integrity: sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw==} - - /@protobufjs/utf8@1.1.0: - resolution: {integrity: sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==} - /@remix-run/router@1.6.0: resolution: {integrity: sha512-N13NRw3T2+6Xi9J//3CGLsK2OqC8NMme3d/YX+nh05K9YHWGcv8DycHJrqGScSP4T75o8IN6nqIMhVFU8ohg8w==} engines: {node: '>=14'} @@ -4555,10 +4471,6 @@ packages: '@types/koa': 2.13.12 dev: true - /@types/long@4.0.2: - resolution: {integrity: sha512-MqTGEo5bj5t157U6fA/BiDynNkn0YknVdh48CMPkTSpFTVmvao5UQmm7uEF6xBEo7qIMAlY/JSleYaE6VOdpaA==} - dev: true - /@types/mime@1.3.5: resolution: {integrity: sha512-/pyBZWSLD2n0dcHE3hq8s8ZvcETHtEuF+3E7XVt0Ig2nvsVQXdghHVcEkIWjy9A0wKfTn97a/PSDYohKIlnP/w==} dev: true @@ -4594,10 +4506,6 @@ packages: resolution: {integrity: sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw==} dev: true - /@types/object-hash@1.3.4: - resolution: {integrity: sha512-xFdpkAkikBgqBdG9vIlsqffDV8GpvnPEzs0IUtr1v3BEB97ijsFQ4RXVbUZwjFThhB4MDSTUfvmxUD5PGx0wXA==} - dev: true - /@types/openurl@1.0.0: resolution: {integrity: sha512-fUHH4T8FmEl3NBtGbUYYzMo1Ev47uVCVEGVjVNjorOMzgjls6zH82yr/zqkkcEOHY2HUC5PZ8dRFwGed/NR7wQ==} dependencies: @@ -4975,10 +4883,6 @@ packages: zod: 3.23.7 dev: false - /abort-controller-x@0.4.1: - resolution: {integrity: sha512-lJ2ssrl3FoTK3cX/g15lRCkXFWKiwRTRtBjfwounO2EM/Q65rI/MEZsfsch1juWU2pH2aLSaq0HGowlDP/imrw==} - dev: false - /abort-controller@3.0.0: resolution: {integrity: sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==} engines: {node: '>=6.5'} @@ -5534,10 +5438,6 @@ packages: resolution: {integrity: sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w==} dev: false - /browser-headers@0.4.1: - resolution: {integrity: sha512-CA9hsySZVo9371qEHjHZtYxV2cFtVj5Wj/ZHi8ooEsrtm4vOnl9Y9HmyYWk9q+05d7K3rdoAE0j3MVEFVvtQtg==} - dev: false - /browserslist@4.23.0: resolution: {integrity: sha512-QW8HiM1shhT2GuzkvklfjcKDiWFXHOeFCIA/huJPwHsslwcydgk7X+z2zXpEijP98UCY7HbubZt5J2Zgvf0CaQ==} engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} @@ -5701,11 +5601,6 @@ packages: resolution: {integrity: sha512-JFPQs34lHKx1B5t1EpQpWH4c+29zIyn/haGsbpfq3suuV9v56enjFt23zqijxGTMwy1p/4H2tjnQMY+p1WoAyA==} dev: true - /case-anything@2.1.10: - resolution: {integrity: sha512-JczJwVrCP0jPKh05McyVsuOg6AYosrB9XWZKbQzXeDAm2ClE/PJE/BcrrQrVyGYH7Jg8V/LDupmyL4kFlVsVFQ==} - engines: {node: '>=12.13'} - dev: true - /chai@4.4.1: resolution: {integrity: sha512-13sOfMv2+DWduEU+/xbun3LScLoqN17nBeTLUsmDfKdoiC1fr0n9PU4guu4AhRcOVFk/sW8LyZWHuhWtQZiF+g==} engines: {node: '>=4'} @@ -6124,10 +6019,6 @@ packages: whatwg-url: 12.0.1 dev: true - /dataloader@1.4.0: - resolution: {integrity: sha512-68s5jYdlvasItOJnCuI2Q9s4q98g0pCyL3HrcKJu8KNugUl8ahgmZYg38ysLTgQjjXX3H8CJLkAvWrclWfcalw==} - dev: true - /date-fns@1.30.1: resolution: {integrity: sha512-hBSVCvSmWC+QypYObzwGOd9wqdDpOt+0wl0KbU+R+uuZBS1jN8VsD1ss3irQDknRj5NvxiTF6oj/nDRnN/UQNw==} dev: true @@ -6245,12 +6136,6 @@ packages: engines: {node: '>=8'} dev: true - /detect-libc@1.0.3: - resolution: {integrity: sha512-pGjwhsmsp4kL2RTz08wcOlGN83otlqHeD/Z5T8GXZB+/YcpQ/dgo+lbU8ZsGxV0HIvqqxo9l7mqYwyYMD9bKDg==} - engines: {node: '>=0.10'} - hasBin: true - dev: true - /detect-libc@2.0.2: resolution: {integrity: sha512-UX6sGumvvqSaXgdKGUsgZWqcUyIXZ/vZTrlRT/iobiKhGL0zL4d3osHj3uqllWJK+i+sixDS/3COVEOFbupFyw==} engines: {node: '>=8'} @@ -6310,12 +6195,6 @@ packages: resolution: {integrity: sha512-7GO6HghkA5fYG9TYnNxi14/7K9f5occMlp3zXAuSxn7CKCxt9xbNWG7yF8hTCSUchlfWSe3uLmlPfigevRItzQ==} engines: {node: '>=12'} - /dprint-node@1.0.7: - resolution: {integrity: sha512-NTZOW9A7ipb0n7z7nC3wftvsbceircwVHSgzobJsEQa+7RnOMbhrfX5IflA6CtC4GA63DSAiHYXa4JKEy9F7cA==} - dependencies: - detect-libc: 1.0.3 - dev: true - /drizzle-orm@0.28.5(@types/better-sqlite3@7.6.4)(better-sqlite3@8.6.0)(postgres@3.3.5): resolution: {integrity: sha512-6r6Iw4c38NAmW6TiKH3TUpGUQ1YdlEoLJOQptn8XPx3Z63+vFNKfAiANqrIiYZiMjKR9+NYAL219nFrmo1duXA==} peerDependencies: @@ -7629,10 +7508,6 @@ packages: merge2: 1.4.1 slash: 3.0.0 - /google-protobuf@3.21.2: - resolution: {integrity: sha512-3MSOYFO5U9mPGikIYCzK0SaThypfGgS6bHqrUGXG3DPHCrb+txNqeEcns1W0lkGfk0rCyNXm7xB9rMxnCiZOoA==} - dev: false - /gopd@1.0.1: resolution: {integrity: sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==} dependencies: @@ -8734,10 +8609,6 @@ packages: engines: {node: '>=10'} dev: true - /js-base64@3.7.5: - resolution: {integrity: sha512-3MEt5DTINKqfScXKfJFrRbxkrnk2AxPWGBL/ycjz4dK8iqiSJ06UxD8jh8xuh6p10TX4t2+7FsBYVxxQbMg+qA==} - dev: false - /js-sha3@0.8.0: resolution: {integrity: sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q==} dev: false @@ -9148,14 +9019,6 @@ packages: wrap-ansi: 3.0.1 dev: true - /long@4.0.0: - resolution: {integrity: sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==} - dev: true - - /long@5.2.1: - resolution: {integrity: sha512-GKSNGeNAtw8IryjjkhZxuKB3JzlcLTwjtiQCHKvqQet81I93kXslhDQruGI/QsddO83mcDToBVy7GqGS/zYf/A==} - dev: false - /loose-envify@1.4.0: resolution: {integrity: sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==} hasBin: true @@ -9538,23 +9401,6 @@ packages: resolution: {integrity: sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ==} dev: false - /nice-grpc-common@2.0.2: - resolution: {integrity: sha512-7RNWbls5kAL1QVUOXvBsv1uO0wPQK3lHv+cY1gwkTzirnG1Nop4cBJZubpgziNbaVc/bl9QJcyvsf/NQxa3rjQ==} - dependencies: - ts-error: 1.0.6 - dev: false - - /nice-grpc-web@2.0.1(google-protobuf@3.21.2): - resolution: {integrity: sha512-r8jy0TJY6ZO9qWtujiqmtRkqgItAChoJxJyYv+CHacP9G5kRIH03M+sQqtieXNNDUAKfFT/z5yroSy1cPFX0sA==} - dependencies: - '@improbable-eng/grpc-web': 0.15.0(google-protobuf@3.21.2) - abort-controller-x: 0.4.1 - js-base64: 3.7.5 - nice-grpc-common: 2.0.2 - transitivePeerDependencies: - - google-protobuf - dev: false - /nice-try@1.0.5: resolution: {integrity: sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==} dev: true @@ -9676,11 +9522,6 @@ packages: engines: {node: '>=0.10.0'} dev: true - /object-hash@1.3.1: - resolution: {integrity: sha512-OSuu/pU4ENM9kmREg0BdNrUDIl1heYa4mBZacJc+vVWz4GtAwu7jO8s4AIt2aGRUTqxykpWzI3Oqnsm13tTMDA==} - engines: {node: '>= 0.10.0'} - dev: true - /object-hash@3.0.0: resolution: {integrity: sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw==} engines: {node: '>= 6'} @@ -10356,45 +10197,6 @@ packages: react-is: 16.13.1 dev: true - /protobufjs@6.11.3: - resolution: {integrity: sha512-xL96WDdCZYdU7Slin569tFX712BxsxslWwAfAhCYjQKGTq7dAU91Lomy6nLLhh/dyGhk/YH4TwTSRxTzhuHyZg==} - hasBin: true - requiresBuild: true - dependencies: - '@protobufjs/aspromise': 1.1.2 - '@protobufjs/base64': 1.1.2 - '@protobufjs/codegen': 2.0.4 - '@protobufjs/eventemitter': 1.1.0 - '@protobufjs/fetch': 1.1.0 - '@protobufjs/float': 1.0.2 - '@protobufjs/inquire': 1.1.0 - '@protobufjs/path': 1.1.2 - '@protobufjs/pool': 1.1.0 - '@protobufjs/utf8': 1.1.0 - '@types/long': 4.0.2 - '@types/node': 18.15.11 - long: 4.0.0 - dev: true - - /protobufjs@7.2.3: - resolution: {integrity: sha512-TtpvOqwB5Gdz/PQmOjgsrGH1nHjAQVCN7JG4A6r1sXRWESL5rNMAiRcBQlCAdKxZcAbstExQePYG8xof/JVRgg==} - engines: {node: '>=12.0.0'} - requiresBuild: true - dependencies: - '@protobufjs/aspromise': 1.1.2 - '@protobufjs/base64': 1.1.2 - '@protobufjs/codegen': 2.0.4 - '@protobufjs/eventemitter': 1.1.0 - '@protobufjs/fetch': 1.1.0 - '@protobufjs/float': 1.0.2 - '@protobufjs/inquire': 1.1.0 - '@protobufjs/path': 1.1.2 - '@protobufjs/pool': 1.1.0 - '@protobufjs/utf8': 1.1.0 - '@types/node': 18.15.11 - long: 5.2.1 - dev: false - /proxy-addr@2.0.7: resolution: {integrity: sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==} engines: {node: '>= 0.10'} @@ -11687,10 +11489,6 @@ packages: typescript: 5.4.2 dev: true - /ts-error@1.0.6: - resolution: {integrity: sha512-tLJxacIQUM82IR7JO1UUkKlYuUTmoY9HBJAmNWFzheSlDS5SPMcNIepejHJa4BpPQLAcbRhRf3GDJzyj6rbKvA==} - dev: false - /ts-interface-checker@0.1.13: resolution: {integrity: sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==} dev: true @@ -11730,32 +11528,6 @@ packages: yargs-parser: 21.1.1 dev: true - /ts-poet@6.4.1: - resolution: {integrity: sha512-AjZEs4h2w4sDfwpHMxQKHrTlNh2wRbM5NRXmLz0RiH+yPGtSQFbe9hBpNocU8vqVNgfh0BIOiXR80xDz3kKxUQ==} - dependencies: - dprint-node: 1.0.7 - dev: true - - /ts-proto-descriptors@1.8.0: - resolution: {integrity: sha512-iV20plcI8+GRkeZIAygxOOH0p2xpOsKfw9kI1W20NCwawi1/4bG/YRd9rQY9XSJP+lD9j7XbSy3tFFuikfsljw==} - dependencies: - long: 4.0.0 - protobufjs: 6.11.3 - dev: true - - /ts-proto@1.146.0: - resolution: {integrity: sha512-OyBZRjmqqw+aatLEUbRooWO6VKTtOLJQyaQFMciigEZPNgTsWtApqHpQDtqDMQFWEXhIARqEV+B7ZJx8cljhZA==} - hasBin: true - dependencies: - '@types/object-hash': 1.3.4 - case-anything: 2.1.10 - dataloader: 1.4.0 - object-hash: 1.3.1 - protobufjs: 6.11.3 - ts-poet: 6.4.1 - ts-proto-descriptors: 1.8.0 - dev: true - /tslib@1.14.1: resolution: {integrity: sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==} diff --git a/templates/phaser/packages/client/package.json b/templates/phaser/packages/client/package.json index 285ce6eb37..cc49aeb822 100644 --- a/templates/phaser/packages/client/package.json +++ b/templates/phaser/packages/client/package.json @@ -17,7 +17,6 @@ "@latticexyz/react": "link:../../../../packages/react", "@latticexyz/recs": "link:../../../../packages/recs", "@latticexyz/schema-type": "link:../../../../packages/schema-type", - "@latticexyz/services": "link:../../../../packages/services", "@latticexyz/store-sync": "link:../../../../packages/store-sync", "@latticexyz/utils": "link:../../../../packages/utils", "@latticexyz/world": "link:../../../../packages/world", diff --git a/templates/phaser/packages/client/src/mud/getNetworkConfig.ts b/templates/phaser/packages/client/src/mud/getNetworkConfig.ts index 90d5ff42f5..fada708cad 100644 --- a/templates/phaser/packages/client/src/mud/getNetworkConfig.ts +++ b/templates/phaser/packages/client/src/mud/getNetworkConfig.ts @@ -5,8 +5,7 @@ /* * By default the template just creates a temporary wallet - * (called a burner wallet) and uses a faucet (on our test net) - * to get ETH for it. + * (called a burner wallet). * * See https://mud.dev/tutorials/minimal/deploy#wallet-managed-address * for how to use the user's own address instead. @@ -83,7 +82,6 @@ export async function getNetworkConfig() { privateKey: getBurnerPrivateKey(), chainId, chain, - faucetServiceUrl: params.get("faucet") ?? chain.faucetUrl, worldAddress, initialBlockNumber, }; diff --git a/templates/phaser/packages/client/src/mud/setupNetwork.ts b/templates/phaser/packages/client/src/mud/setupNetwork.ts index dc58cfb1e5..d219d8e87a 100644 --- a/templates/phaser/packages/client/src/mud/setupNetwork.ts +++ b/templates/phaser/packages/client/src/mud/setupNetwork.ts @@ -10,11 +10,9 @@ import { http, createWalletClient, Hex, - parseEther, ClientConfig, getContract, } from "viem"; -import { createFaucetService } from "@latticexyz/services/faucet"; import { encodeEntity, syncToRecs } from "@latticexyz/store-sync/recs"; import { getNetworkConfig } from "./getNetworkConfig"; import { world } from "./world"; @@ -91,34 +89,6 @@ export async function setupNetwork() { startBlock: BigInt(networkConfig.initialBlockNumber), }); - /* - * If there is a faucet, request (test) ETH if you have - * less than 1 ETH. Repeat every 20 seconds to ensure you don't - * run out. - */ - if (networkConfig.faucetServiceUrl) { - const address = burnerAccount.address; - console.info("[Dev Faucet]: Player address -> ", address); - - const faucet = createFaucetService(networkConfig.faucetServiceUrl); - - const requestDrip = async () => { - const balance = await publicClient.getBalance({ address }); - console.info(`[Dev Faucet]: Player balance -> ${balance}`); - const lowBalance = balance < parseEther("1"); - if (lowBalance) { - console.info("[Dev Faucet]: Balance is low, dripping funds to player"); - // Double drip - await faucet.dripDev({ address }); - await faucet.dripDev({ address }); - } - }; - - requestDrip(); - // Request a drip every 20 seconds - setInterval(requestDrip, 20000); - } - return { world, components, diff --git a/templates/react-ecs/packages/client/package.json b/templates/react-ecs/packages/client/package.json index 18098bbb19..04710c072d 100644 --- a/templates/react-ecs/packages/client/package.json +++ b/templates/react-ecs/packages/client/package.json @@ -16,7 +16,6 @@ "@latticexyz/react": "link:../../../../packages/react", "@latticexyz/recs": "link:../../../../packages/recs", "@latticexyz/schema-type": "link:../../../../packages/schema-type", - "@latticexyz/services": "link:../../../../packages/services", "@latticexyz/store-sync": "link:../../../../packages/store-sync", "@latticexyz/utils": "link:../../../../packages/utils", "@latticexyz/world": "link:../../../../packages/world", diff --git a/templates/react-ecs/packages/client/src/mud/getNetworkConfig.ts b/templates/react-ecs/packages/client/src/mud/getNetworkConfig.ts index 61ad962f25..2794583cca 100644 --- a/templates/react-ecs/packages/client/src/mud/getNetworkConfig.ts +++ b/templates/react-ecs/packages/client/src/mud/getNetworkConfig.ts @@ -6,8 +6,7 @@ /* * By default the template just creates a temporary wallet - * (called a burner wallet) and uses a faucet (on our test net) - * to get ETH for it. + * (called a burner wallet). * * See https://mud.dev/tutorials/minimal/deploy#wallet-managed-address * for how to use the user's own address instead. @@ -84,7 +83,6 @@ export async function getNetworkConfig() { privateKey: getBurnerPrivateKey(), chainId, chain, - faucetServiceUrl: params.get("faucet") ?? chain.faucetUrl, worldAddress, initialBlockNumber, }; diff --git a/templates/react-ecs/packages/client/src/mud/setupNetwork.ts b/templates/react-ecs/packages/client/src/mud/setupNetwork.ts index 0d1c6ef75b..d7a6b06dc1 100644 --- a/templates/react-ecs/packages/client/src/mud/setupNetwork.ts +++ b/templates/react-ecs/packages/client/src/mud/setupNetwork.ts @@ -10,11 +10,9 @@ import { http, createWalletClient, Hex, - parseEther, ClientConfig, getContract, } from "viem"; -import { createFaucetService } from "@latticexyz/services/faucet"; import { encodeEntity, syncToRecs } from "@latticexyz/store-sync/recs"; import { getNetworkConfig } from "./getNetworkConfig"; @@ -93,34 +91,6 @@ export async function setupNetwork() { startBlock: BigInt(networkConfig.initialBlockNumber), }); - /* - * If there is a faucet, request (test) ETH if you have - * less than 1 ETH. Repeat every 20 seconds to ensure you don't - * run out. - */ - if (networkConfig.faucetServiceUrl) { - const address = burnerAccount.address; - console.info("[Dev Faucet]: Player address -> ", address); - - const faucet = createFaucetService(networkConfig.faucetServiceUrl); - - const requestDrip = async () => { - const balance = await publicClient.getBalance({ address }); - console.info(`[Dev Faucet]: Player balance -> ${balance}`); - const lowBalance = balance < parseEther("1"); - if (lowBalance) { - console.info("[Dev Faucet]: Balance is low, dripping funds to player"); - // Double drip - await faucet.dripDev({ address }); - await faucet.dripDev({ address }); - } - }; - - requestDrip(); - // Request a drip every 20 seconds - setInterval(requestDrip, 20000); - } - return { world, components, diff --git a/templates/react/packages/client/package.json b/templates/react/packages/client/package.json index 66cefb659d..1117fbe36d 100644 --- a/templates/react/packages/client/package.json +++ b/templates/react/packages/client/package.json @@ -15,7 +15,6 @@ "@latticexyz/dev-tools": "link:../../../../packages/dev-tools", "@latticexyz/react": "link:../../../../packages/react", "@latticexyz/schema-type": "link:../../../../packages/schema-type", - "@latticexyz/services": "link:../../../../packages/services", "@latticexyz/store-sync": "link:../../../../packages/store-sync", "@latticexyz/utils": "link:../../../../packages/utils", "@latticexyz/world": "link:../../../../packages/world", diff --git a/templates/react/packages/client/src/mud/getNetworkConfig.ts b/templates/react/packages/client/src/mud/getNetworkConfig.ts index 61ad962f25..2794583cca 100644 --- a/templates/react/packages/client/src/mud/getNetworkConfig.ts +++ b/templates/react/packages/client/src/mud/getNetworkConfig.ts @@ -6,8 +6,7 @@ /* * By default the template just creates a temporary wallet - * (called a burner wallet) and uses a faucet (on our test net) - * to get ETH for it. + * (called a burner wallet). * * See https://mud.dev/tutorials/minimal/deploy#wallet-managed-address * for how to use the user's own address instead. @@ -84,7 +83,6 @@ export async function getNetworkConfig() { privateKey: getBurnerPrivateKey(), chainId, chain, - faucetServiceUrl: params.get("faucet") ?? chain.faucetUrl, worldAddress, initialBlockNumber, }; diff --git a/templates/react/packages/client/src/mud/setupNetwork.ts b/templates/react/packages/client/src/mud/setupNetwork.ts index c9b54e4094..dba19e3f4c 100644 --- a/templates/react/packages/client/src/mud/setupNetwork.ts +++ b/templates/react/packages/client/src/mud/setupNetwork.ts @@ -10,11 +10,9 @@ import { http, createWalletClient, Hex, - parseEther, ClientConfig, getContract, } from "viem"; -import { createFaucetService } from "@latticexyz/services/faucet"; import { syncToZustand } from "@latticexyz/store-sync/zustand"; import { getNetworkConfig } from "./getNetworkConfig"; import IWorldAbi from "contracts/out/IWorld.sol/IWorld.abi.json"; @@ -89,34 +87,6 @@ export async function setupNetwork() { startBlock: BigInt(networkConfig.initialBlockNumber), }); - /* - * If there is a faucet, request (test) ETH if you have - * less than 1 ETH. Repeat every 20 seconds to ensure you don't - * run out. - */ - if (networkConfig.faucetServiceUrl) { - const address = burnerAccount.address; - console.info("[Dev Faucet]: Player address -> ", address); - - const faucet = createFaucetService(networkConfig.faucetServiceUrl); - - const requestDrip = async () => { - const balance = await publicClient.getBalance({ address }); - console.info(`[Dev Faucet]: Player balance -> ${balance}`); - const lowBalance = balance < parseEther("1"); - if (lowBalance) { - console.info("[Dev Faucet]: Balance is low, dripping funds to player"); - // Double drip - await faucet.dripDev({ address }); - await faucet.dripDev({ address }); - } - }; - - requestDrip(); - // Request a drip every 20 seconds - setInterval(requestDrip, 20000); - } - return { tables, useStore, diff --git a/templates/threejs/packages/client/package.json b/templates/threejs/packages/client/package.json index caaa39d369..8bf95ab68d 100644 --- a/templates/threejs/packages/client/package.json +++ b/templates/threejs/packages/client/package.json @@ -16,7 +16,6 @@ "@latticexyz/react": "link:../../../../packages/react", "@latticexyz/recs": "link:../../../../packages/recs", "@latticexyz/schema-type": "link:../../../../packages/schema-type", - "@latticexyz/services": "link:../../../../packages/services", "@latticexyz/store-sync": "link:../../../../packages/store-sync", "@latticexyz/utils": "link:../../../../packages/utils", "@latticexyz/world": "link:../../../../packages/world", diff --git a/templates/threejs/packages/client/src/mud/getNetworkConfig.ts b/templates/threejs/packages/client/src/mud/getNetworkConfig.ts index e0bebfe426..bbbc5fdc6a 100644 --- a/templates/threejs/packages/client/src/mud/getNetworkConfig.ts +++ b/templates/threejs/packages/client/src/mud/getNetworkConfig.ts @@ -6,8 +6,7 @@ /* * By default the template just creates a temporary wallet - * (called a burner wallet) and uses a faucet (on our test net) - * to get ETH for it. + * (called a burner wallet). * * See https://mud.dev/tutorials/minimal/deploy#wallet-managed-address * for how to use the user's own address instead. @@ -87,7 +86,6 @@ export async function getNetworkConfig() { privateKey: getBurnerPrivateKey(), chainId, chain, - faucetServiceUrl: params.get("faucet") ?? chain.faucetUrl, worldAddress, initialBlockNumber, }; diff --git a/templates/threejs/packages/client/src/mud/setupNetwork.ts b/templates/threejs/packages/client/src/mud/setupNetwork.ts index 1d98c384ac..ca221c50e1 100644 --- a/templates/threejs/packages/client/src/mud/setupNetwork.ts +++ b/templates/threejs/packages/client/src/mud/setupNetwork.ts @@ -10,11 +10,9 @@ import { http, createWalletClient, Hex, - parseEther, ClientConfig, getContract, } from "viem"; -import { createFaucetService } from "@latticexyz/services/faucet"; import { encodeEntity, syncToRecs } from "@latticexyz/store-sync/recs"; import { getNetworkConfig } from "./getNetworkConfig"; import { world } from "./world"; @@ -91,34 +89,6 @@ export async function setupNetwork() { startBlock: BigInt(networkConfig.initialBlockNumber), }); - /* - * If there is a faucet, request (test) ETH if you have - * less than 1 ETH. Repeat every 20 seconds to ensure you don't - * run out. - */ - if (networkConfig.faucetServiceUrl) { - const address = burnerAccount.address; - console.info("[Dev Faucet]: Player address -> ", address); - - const faucet = createFaucetService(networkConfig.faucetServiceUrl); - - const requestDrip = async () => { - const balance = await publicClient.getBalance({ address }); - console.info(`[Dev Faucet]: Player balance -> ${balance}`); - const lowBalance = balance < parseEther("1"); - if (lowBalance) { - console.info("[Dev Faucet]: Balance is low, dripping funds to player"); - // Double drip - await faucet.dripDev({ address }); - await faucet.dripDev({ address }); - } - }; - - requestDrip(); - // Request a drip every 20 seconds - setInterval(requestDrip, 20000); - } - return { world, components, diff --git a/templates/vanilla/packages/client/package.json b/templates/vanilla/packages/client/package.json index 5992b7704e..58f660b0f5 100644 --- a/templates/vanilla/packages/client/package.json +++ b/templates/vanilla/packages/client/package.json @@ -15,7 +15,6 @@ "@latticexyz/dev-tools": "link:../../../../packages/dev-tools", "@latticexyz/recs": "link:../../../../packages/recs", "@latticexyz/schema-type": "link:../../../../packages/schema-type", - "@latticexyz/services": "link:../../../../packages/services", "@latticexyz/store-sync": "link:../../../../packages/store-sync", "@latticexyz/utils": "link:../../../../packages/utils", "@latticexyz/world": "link:../../../../packages/world", diff --git a/templates/vanilla/packages/client/src/mud/getNetworkConfig.ts b/templates/vanilla/packages/client/src/mud/getNetworkConfig.ts index d2a724be41..cb841d683a 100644 --- a/templates/vanilla/packages/client/src/mud/getNetworkConfig.ts +++ b/templates/vanilla/packages/client/src/mud/getNetworkConfig.ts @@ -6,8 +6,7 @@ /* * By default the template just creates a temporary wallet - * (called a burner wallet) and uses a faucet (on our test net) - * to get ETH for it. + * (called a burner wallet). * * See https://mud.dev/tutorials/minimal/deploy#wallet-managed-address * for how to use the user's own address instead. @@ -85,7 +84,6 @@ export async function getNetworkConfig() { privateKey: getBurnerPrivateKey(), chainId, chain, - faucetServiceUrl: params.get("faucet") ?? chain.faucetUrl, worldAddress, initialBlockNumber, }; diff --git a/templates/vanilla/packages/client/src/mud/setupNetwork.ts b/templates/vanilla/packages/client/src/mud/setupNetwork.ts index 0d1c6ef75b..d7a6b06dc1 100644 --- a/templates/vanilla/packages/client/src/mud/setupNetwork.ts +++ b/templates/vanilla/packages/client/src/mud/setupNetwork.ts @@ -10,11 +10,9 @@ import { http, createWalletClient, Hex, - parseEther, ClientConfig, getContract, } from "viem"; -import { createFaucetService } from "@latticexyz/services/faucet"; import { encodeEntity, syncToRecs } from "@latticexyz/store-sync/recs"; import { getNetworkConfig } from "./getNetworkConfig"; @@ -93,34 +91,6 @@ export async function setupNetwork() { startBlock: BigInt(networkConfig.initialBlockNumber), }); - /* - * If there is a faucet, request (test) ETH if you have - * less than 1 ETH. Repeat every 20 seconds to ensure you don't - * run out. - */ - if (networkConfig.faucetServiceUrl) { - const address = burnerAccount.address; - console.info("[Dev Faucet]: Player address -> ", address); - - const faucet = createFaucetService(networkConfig.faucetServiceUrl); - - const requestDrip = async () => { - const balance = await publicClient.getBalance({ address }); - console.info(`[Dev Faucet]: Player balance -> ${balance}`); - const lowBalance = balance < parseEther("1"); - if (lowBalance) { - console.info("[Dev Faucet]: Balance is low, dripping funds to player"); - // Double drip - await faucet.dripDev({ address }); - await faucet.dripDev({ address }); - } - }; - - requestDrip(); - // Request a drip every 20 seconds - setInterval(requestDrip, 20000); - } - return { world, components,