Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: abi output path #198

Merged
merged 8 commits into from
Dec 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/vercel-preview.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
env:
FOUNDRY_PROFILE: ci
PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }}
DEBUG: "mud:*"

permissions:
pull-requests: write
Expand All @@ -14,6 +15,7 @@ permissions:

jobs:
build:
timeout-minutes: 10
strategy:
fail-fast: true

Expand Down Expand Up @@ -45,7 +47,7 @@ jobs:
run: pnpm install

- name: deploy on lattice testnet
run: cd packages/contracts; pnpm run deploy:alt
run: cd packages/contracts; pnpm run deploy:testnet

- name: build
run: pnpm build
Expand Down
6 changes: 3 additions & 3 deletions packages/client/src/mud/setupNetwork.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ import { encodeEntity, syncToRecs } from "@latticexyz/store-sync/recs";

import { getNetworkConfig } from "./getNetworkConfig";
import { world } from "./world";
import IWorldAbi from "contracts/abi/IWorld.sol/IWorld.abi.json";
import IWorldAbi from "contracts/out/IWorld.sol/IWorld.abi.json";
import {
createBurnerAccount,
createContract,
transportObserver,
ContractWrite,
getContract,
} from "@latticexyz/common";

import { Subject, share } from "rxjs";
Expand Down Expand Up @@ -74,7 +74,7 @@ export async function setupNetwork() {
/*
* Create an object for communicating with the deployed World.
*/
const worldContract = createContract({
const worldContract = getContract({
address: networkConfig.worldAddress as Hex,
abi: IWorldAbi,
publicClient,
Expand Down
2 changes: 1 addition & 1 deletion packages/contracts/foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ defaultGasLimit = 6000000
lib = ["node_modules", "lib"]

[profile.lattice-testnet]
eth_rpc_url = "https://follower.testnet-chain.linfra.xyz"
eth_rpc_url = "https://xp-follower.testnet-chain.linfra.xyz "
optimizer = true
optimizer_runs = 3000

Expand Down
9 changes: 6 additions & 3 deletions packages/contracts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,12 @@
"license": "MIT",
"scripts": {
"build": "pnpm run build:mud && pnpm run build:abi && pnpm run build:abi-ts",
"build:abi": "rimraf abi && forge build --extra-output-files abi --out abi --skip test script MudTest.sol",
"build:abi-ts": "mud abi-ts --input 'abi/IWorld.sol/IWorld.abi.json' && prettier --write '**/*.abi.json.d.ts'",
"build:abi": "forge build",
"build:abi-ts": "mud abi-ts",
"build:mud": "mud tablegen && mud worldgen",
"clean": "pnpm run clean:abi && pnpm run clean:mud",
"clean:abi": "forge clean",
"clean:mud": "rimraf src/codegen",
"deploy:local": "pnpm run build && mud deploy",
"deploy:testnet": "pnpm run build && mud deploy --profile=lattice-testnet",
"deploy:arb": "pnpm run build && mud deploy --profile=arbitrum-goerli",
Expand Down Expand Up @@ -38,4 +41,4 @@
"solhint-config-mud": "2.0.0-next.14",
"solhint-plugin-mud": "2.0.0-next.14"
}
}
}
Loading