Skip to content

Commit 81ca635

Browse files
smallbraingamessmallbraingames
smallbraingames
authored andcommitted
feat: update tests
1 parent e0143fa commit 81ca635

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+3601
-1540
lines changed

foundry.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[profile.default]
2-
solc_version = "0.8.20"
2+
solc_version = "0.8.23"
33
ffi = false
44
optimizer = true
55
optimizer_runs = 3000

mud.config.ts

+15-16
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,25 @@
11
import { mudConfig } from "@latticexyz/world/register";
22

33
export default mudConfig({
4-
worldContractName: "GatedWorld",
54
tables: {
65
// Config
76
GameConfig: {
87
keySchema: {},
9-
schema: {
8+
valueSchema: {
109
status: "Status",
1110
endTime: "uint256",
1211
crossWordRewardFraction: "uint32",
1312
},
1413
},
1514
MerkleRootConfig: {
1615
keySchema: {},
17-
schema: {
16+
valueSchema: {
1817
value: "bytes32",
1918
},
2019
},
2120
VRGDAConfig: {
2221
keySchema: {},
23-
schema: {
22+
valueSchema: {
2423
startTime: "uint256",
2524
targetPrice: "int256",
2625
priceDecay: "int256",
@@ -31,44 +30,44 @@ export default mudConfig({
3130
// Game
3231
TileLetter: {
3332
keySchema: { x: "int32", y: "int32" },
34-
schema: {
33+
valueSchema: {
3534
value: "Letter",
3635
},
3736
},
3837
TilePlayer: {
3938
keySchema: { x: "int32", y: "int32" },
40-
schema: {
39+
valueSchema: {
4140
value: "address",
4241
},
4342
},
4443
Treasury: {
4544
keySchema: {},
46-
schema: {
45+
valueSchema: {
4746
value: "uint256",
4847
},
4948
},
5049
Points: {
5150
keySchema: { player: "address" },
52-
schema: {
51+
valueSchema: {
5352
value: "uint32",
5453
},
5554
},
5655
Spent: {
5756
keySchema: { player: "address", id: "uint256" },
58-
schema: {
57+
valueSchema: {
5958
value: "uint256",
6059
},
61-
ephemeral: true,
60+
offchainOnly: true,
6261
},
6362
LetterCount: {
6463
keySchema: { letter: "Letter" },
65-
schema: {
64+
valueSchema: {
6665
value: "uint32",
6766
},
6867
},
6968
Claimed: {
7069
keySchema: { player: "address" },
71-
schema: {
70+
valueSchema: {
7271
value: "bool",
7372
},
7473
},
@@ -77,7 +76,7 @@ export default mudConfig({
7776
keySchema: {
7877
id: "uint256",
7978
},
80-
schema: {
79+
valueSchema: {
8180
player: "address",
8281
direction: "Direction",
8382
timestamp: "uint256",
@@ -86,18 +85,18 @@ export default mudConfig({
8685
word: "uint8[]",
8786
filledWord: "uint8[]",
8887
},
89-
ephemeral: true,
88+
offchainOnly: true,
9089
},
9190
PointsResult: {
9291
keySchema: {
9392
id: "uint256",
9493
player: "address",
9594
pointsId: "int16",
9695
},
97-
schema: {
96+
valueSchema: {
9897
points: "uint32",
9998
},
100-
ephemeral: true,
99+
offchainOnly: true,
101100
},
102101
},
103102
enums: {

package.json

+16-28
Original file line numberDiff line numberDiff line change
@@ -4,39 +4,27 @@
44
"private": true,
55
"license": "MIT",
66
"scripts": {
7-
"build": "forge clean && forge build",
8-
"deploy": "pnpm run initialize && mud deploy --debug",
9-
"deploy:testnet": "pnpm run initialize && mud deploy --profile=lattice-testnet --debug",
10-
"deploy:base-testnet": "pnpm run initialize && mud deploy --priority-fee-multiplier 0.1 --profile=base-testnet",
11-
"deploy:base-mainnet": "pnpm run initialize && mud deploy --priority-fee-multiplier 0.1 --profile=base-mainnet",
12-
"dev": "pnpm mud dev-contracts --tsgenOutput ./mud",
13-
"dev:phaser": "pnpm mud dev-contracts --tsgenOutput ./mud",
14-
"initialize": "pnpm run tablegen && pnpm run worldgen && pnpm run build && pnpm run worldtypes && pnpm run tsgen",
7+
"build": "mud build",
8+
"clean": "forge clean && rimraf src/codegen",
9+
"deploy:local": "pnpm run build && mud deploy",
10+
"deploy:testnet": "pnpm run build && mud deploy --profile=lattice-testnet",
11+
"dev": "pnpm mud dev-contracts",
12+
"faucet": "DEBUG=mud:faucet pnpm faucet-server",
1513
"lint": "pnpm run prettier && pnpm run solhint",
1614
"prettier": "prettier --write 'src/**/*.sol'",
1715
"solhint": "solhint --config ./.solhint.json 'src/**/*.sol' --fix",
18-
"tablegen": "mud tablegen",
19-
"test": "mud test",
20-
"tsgen": "mud tsgen --configPath mud.config.ts --out ./mud",
21-
"worldgen": "mud worldgen",
22-
"worldtypes": "rimraf types && typechain --target=ethers-v5 out/IWorld.sol/IWorld.json"
16+
"test": "mud test"
2317
},
2418
"devDependencies": {
25-
"@ethersproject/abi": "^5.7.0",
26-
"@ethersproject/bytes": "^5.7.0",
27-
"@ethersproject/providers": "^5.7.2",
28-
"@latticexyz/cli": "2.0.0-main-57a52608",
29-
"@latticexyz/common": "2.0.0-main-57a52608",
30-
"@latticexyz/config": "2.0.0-main-57a52608",
31-
"@latticexyz/recs": "2.0.0-main-57a52608",
32-
"@latticexyz/schema-type": "2.0.0-main-57a52608",
33-
"@latticexyz/solecs": "2.0.0-main-57a52608",
34-
"@latticexyz/std-contracts": "2.0.0-main-57a52608",
35-
"@latticexyz/store": "2.0.0-main-57a52608",
36-
"@latticexyz/world": "2.0.0-main-57a52608",
19+
"@latticexyz/cli": "2.0.0-next.15",
20+
"@latticexyz/config": "2.0.0-next.15",
21+
"@latticexyz/faucet": "2.0.0-next.15",
22+
"@latticexyz/store": "2.0.0-next.15",
23+
"@latticexyz/schema-type": "2.0.0-next.15",
24+
"@latticexyz/world": "2.0.0-next.15",
25+
"@latticexyz/world-modules": "2.0.0-next.15",
3726
"@openzeppelin/contracts": "^4.8.3",
3827
"@solidstate/contracts": "^0.0.52",
39-
"@typechain/ethers-v5": "^10.2.0",
4028
"@types/node": "^18.15.11",
4129
"ds-test": "https://github.com/dapphub/ds-test.git#c9ce3f25bde29fc5eb9901842bf02850dfd2d084",
4230
"ethers": "^5.7.2",
@@ -46,8 +34,8 @@
4634
"rimraf": "^3.0.2",
4735
"run-pty": "^4.0.3",
4836
"solhint": "^3.4.1",
49-
"solhint-config-mud": "2.0.0-next.0",
50-
"solhint-plugin-mud": "2.0.0-next.0",
37+
"solhint-config-mud": "2.0.0-next.15",
38+
"solhint-plugin-mud": "2.0.0-next.15",
5139
"solmate": "6.1.0",
5240
"ts-node": "^10.9.1",
5341
"typechain": "^8.1.1",

0 commit comments

Comments
 (0)