Skip to content

Commit

Permalink
feat: bump solidity to 0.8.21 (#1473)
Browse files Browse the repository at this point in the history
  • Loading branch information
holic authored Sep 21, 2023
1 parent bfcb293 commit 92de599
Show file tree
Hide file tree
Showing 261 changed files with 450 additions and 432 deletions.
12 changes: 12 additions & 0 deletions .changeset/serious-ads-trade.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
"@latticexyz/cli": minor
"@latticexyz/common": minor
"@latticexyz/gas-report": major
"@latticexyz/noise": major
"@latticexyz/schema-type": major
"@latticexyz/store": major
"@latticexyz/world": major
"create-mud": minor
---

Bump Solidity version to 0.8.21
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"solidity.monoRepoSupport": true
"solidity.monoRepoSupport": true,
"solidity.compileUsingRemoteVersion": "v0.8.21+commit.d9974bed"
}
2 changes: 1 addition & 1 deletion e2e/packages/contracts/foundry.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[profile.default]
solc_version = "0.8.13"
solc = "0.8.21"
ffi = false
fuzz_runs = 256
optimizer = true
Expand Down
2 changes: 1 addition & 1 deletion e2e/packages/contracts/src/CustomTypes.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.0;
pragma solidity >=0.8.21;

struct Position {
int32 x;
Expand Down
2 changes: 1 addition & 1 deletion e2e/packages/contracts/src/codegen/index.sol

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion e2e/packages/contracts/src/codegen/tables/Multi.sol

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion e2e/packages/contracts/src/codegen/tables/Number.sol

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion e2e/packages/contracts/src/codegen/tables/NumberList.sol

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion e2e/packages/contracts/src/codegen/tables/Vector.sol

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion e2e/packages/contracts/src/codegen/world/IWorld.sol

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion e2e/packages/contracts/src/systems/CustomErrorsSystem.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.0;
pragma solidity >=0.8.21;

import { System } from "@latticexyz/world/src/System.sol";
import { Position } from "../CustomTypes.sol";
Expand Down
2 changes: 1 addition & 1 deletion e2e/packages/contracts/src/systems/NumberListSystem.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.0;
pragma solidity >=0.8.21;

import { StoreSwitch } from "@latticexyz/store/src/StoreSwitch.sol";
import { EncodeArray } from "@latticexyz/store/src/tightcoder/EncodeArray.sol";
Expand Down
2 changes: 1 addition & 1 deletion e2e/packages/contracts/test/Worldgen.t.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.0;
pragma solidity >=0.8.21;

import { MudTest } from "@latticexyz/world/test/MudTest.t.sol";

Expand Down
2 changes: 1 addition & 1 deletion examples/minimal/packages/contracts/foundry.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[profile.default]
solc_version = "0.8.13"
solc = "0.8.21"
ffi = false
fuzz_runs = 256
optimizer = true
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.0;
pragma solidity >=0.8.21;

import { Script } from "forge-std/Script.sol";
import { console } from "forge-std/console.sol";
Expand Down
2 changes: 1 addition & 1 deletion examples/minimal/packages/contracts/src/codegen/index.sol

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.0;
pragma solidity >=0.8.21;

// TODO allow overriding namespace per-system
interface IChatNamespacedSystem {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.0;
pragma solidity >=0.8.21;
import { System } from "@latticexyz/world/src/System.sol";
import { MessageTable } from "../codegen/index.sol";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.0;
pragma solidity >=0.8.21;
import { System } from "@latticexyz/world/src/System.sol";
import { MessageTable } from "../codegen/index.sol";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.0;
pragma solidity >=0.8.21;
import { console } from "forge-std/console.sol";
import { System } from "@latticexyz/world/src/System.sol";
import { CounterTable } from "../codegen/index.sol";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.0;
pragma solidity >=0.8.21;
import { System } from "@latticexyz/world/src/System.sol";
import { Inventory } from "../codegen/index.sol";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.0;
pragma solidity >=0.8.21;
import { System } from "@latticexyz/world/src/System.sol";
import { CounterTable } from "../codegen/index.sol";
import { BytesStruct, StringStruct } from "./structs.sol";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.0;
pragma solidity >=0.8.21;

struct BytesStruct {
bytes value;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.0;
pragma solidity >=0.8.21;

import "forge-std/Test.sol";
import { MudTest } from "@latticexyz/world/test/MudTest.t.sol";
Expand Down
2 changes: 1 addition & 1 deletion examples/minimal/packages/contracts/test/CounterTest.t.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.0;
pragma solidity >=0.8.21;

import "forge-std/Test.sol";
import { MudTest } from "@latticexyz/world/test/MudTest.t.sol";
Expand Down
2 changes: 1 addition & 1 deletion examples/minimal/packages/contracts/test/StructTest.t.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.0;
pragma solidity >=0.8.21;

import "forge-std/Test.sol";
import { MudTest } from "@latticexyz/world/test/MudTest.t.sol";
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/contracts/src/codegen/common.sol

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/cli/contracts/src/codegen/index.sol

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/cli/contracts/src/codegen/tables/Dynamics1.sol

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/cli/contracts/src/codegen/tables/Dynamics2.sol

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/cli/contracts/src/codegen/tables/Offchain.sol

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/cli/contracts/src/codegen/tables/Singleton.sol

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/cli/contracts/src/codegen/tables/Statics.sol

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/cli/contracts/test/Tablegen.t.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.0;
pragma solidity >=0.8.21;

import "forge-std/Test.sol";
import { StoreMock } from "@latticexyz/store/test/StoreMock.sol";
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/foundry.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[profile.default]
# check all "WARNING:" comments before changing major solidity versions
solc_version = "0.8.13"
solc = "0.8.21"
ffi = false
fuzz_runs = 256
optimizer = true
Expand Down
3 changes: 2 additions & 1 deletion packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@
"build": "pnpm run build:js && pnpm run build:test-tables",
"build:js": "tsup && chmod +x ./dist/mud.js",
"build:test-tables": "tsx ./scripts/generate-test-tables.ts",
"clean": "pnpm run clean:js",
"clean": "pnpm run clean:js && pnpm run clean:test-tables",
"clean:js": "rimraf dist",
"clean:test-tables": "rimraf src/codegen",
"dev": "tsup --watch",
"lint": "eslint . --ext .ts",
"prepare": "mkdir -p ./dist && touch ./dist/mud.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/common/src/codegen/render-solidity/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
import { posixPath } from "../utils";

export const renderedSolidityHeader = `// SPDX-License-Identifier: MIT
pragma solidity >=0.8.0;
pragma solidity >=0.8.21;
/* Autogenerated file. Do not edit manually. */`;

Expand Down
2 changes: 1 addition & 1 deletion packages/gas-report/foundry.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[profile.default]
solc_version = '0.8.13'
solc = "0.8.21"
ffi = false
fuzz_runs = 256
optimizer = true
Expand Down
2 changes: 1 addition & 1 deletion packages/gas-report/src/GasReporter.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.0;
pragma solidity >=0.8.21;

import { Test, console } from "forge-std/Test.sol";

Expand Down
2 changes: 1 addition & 1 deletion packages/gas-report/test/GasReporter.t.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.0;
pragma solidity >=0.8.21;

import { Test } from "forge-std/Test.sol";
import { GasReporter } from "../src/GasReporter.sol";
Expand Down
2 changes: 1 addition & 1 deletion packages/noise/contracts/Perlin.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
pragma solidity >=0.8.21;

import { ABDKMath64x64 as Math } from "abdk-libraries-solidity/ABDKMath64x64.sol";

Expand Down
2 changes: 1 addition & 1 deletion packages/noise/foundry.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[profile.default]
solc_version = "0.8.13"
solc = "0.8.21"
ffi = false
fuzz_runs = 256
optimizer = true
Expand Down
2 changes: 1 addition & 1 deletion packages/noise/test/forge/Perlin.t.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.0;
pragma solidity >=0.8.21;

import "forge-std/Test.sol";
import { Perlin } from "../../contracts/Perlin.sol";
Expand Down
2 changes: 1 addition & 1 deletion packages/schema-type/foundry.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[profile.default]
solc_version = "0.8.13"
solc = "0.8.21"
ffi = false
fuzz_runs = 256
optimizer = true
Expand Down
2 changes: 1 addition & 1 deletion packages/schema-type/src/solidity/SchemaType.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.0;
pragma solidity >=0.8.21;

using { getStaticByteLength } for SchemaType global;

Expand Down
Loading

0 comments on commit 92de599

Please sign in to comment.