-
Notifications
You must be signed in to change notification settings - Fork 195
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge commit '1b477d476a666ccffafc6eb266d1732b90bc28f9' into entrykit
- Loading branch information
Showing
82 changed files
with
877 additions
and
1,109 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@latticexyz/cli": patch | ||
--- | ||
|
||
When upgrading an existing world, the deployer now attempts to read the deploy block number from the `worlds.json` file. If it is found, the `HelloWorld` and `HelloStore` event are fetched from this block instead of searching for the events starting from the genesis block. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@latticexyz/explorer": patch | ||
--- | ||
|
||
The functions in the Interact tab now display the emitted logs with the block explorer URL for the submitted transaction. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@latticexyz/world": patch | ||
--- | ||
|
||
Moved TS utils over to using hardcoded ABIs instead of ones imported from `.abi.json` files to fix some internal type resolution issues. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@latticexyz/store": patch | ||
--- | ||
|
||
Added internal `getRecord` and `getStaticDataLocation` helpers. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@latticexyz/paymaster": patch | ||
--- | ||
|
||
Added `GenerousPaymaster`, a simple paymaster that sponsors all user operations for local development purposes. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,35 @@ | ||
import { DeterministicContract, LibraryPlaceholder, salt } from "./common"; | ||
import { DeterministicContract, LibraryPlaceholder } from "./common"; | ||
import { spliceHex } from "@latticexyz/common"; | ||
import { Hex, getCreate2Address, Address } from "viem"; | ||
import { Hex, Address } from "viem"; | ||
import { LibraryMap } from "./getLibraryMap"; | ||
import { getContractAddress } from "@latticexyz/common/internal"; | ||
|
||
export function createPrepareDeploy( | ||
bytecodeWithPlaceholders: Hex, | ||
placeholders: readonly LibraryPlaceholder[], | ||
): DeterministicContract["prepareDeploy"] { | ||
return function prepareDeploy(deployer: Address, libraryMap?: LibraryMap) { | ||
return function prepareDeploy(deployerAddress: Address, libraryMap?: LibraryMap) { | ||
let bytecode = bytecodeWithPlaceholders; | ||
|
||
if (placeholders.length === 0) { | ||
return { bytecode, address: getCreate2Address({ from: deployer, bytecode, salt }) }; | ||
return { bytecode, address: getContractAddress({ deployerAddress, bytecode }) }; | ||
} | ||
|
||
if (!libraryMap) { | ||
throw new Error("Libraries must be provided if there are placeholders"); | ||
} | ||
|
||
for (const placeholder of placeholders) { | ||
const address = libraryMap.getAddress({ name: placeholder.name, path: placeholder.path, deployer }); | ||
const address = libraryMap.getAddress({ | ||
name: placeholder.name, | ||
path: placeholder.path, | ||
deployer: deployerAddress, | ||
}); | ||
bytecode = spliceHex(bytecode, placeholder.start, placeholder.length, address); | ||
} | ||
return { | ||
bytecode, | ||
address: getCreate2Address({ from: deployer, bytecode, salt }), | ||
address: getContractAddress({ deployerAddress, bytecode }), | ||
}; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.