-
Notifications
You must be signed in to change notification settings - Fork 359
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: handle zksync direct deploys in deployContract (#5002)
## Problem solved Short description of the bug fixed or feature added <!-- start pr-codex --> --- ## PR-Codex overview This PR focuses on enhancing the `thirdweb` library with new features and bug fixes, particularly for zkSync deployments and improvements to various ERC1155 and ERC721 modules. ### Detailed summary - Added support for zkSync direct deploys in `deployContract`. - Updated `SequentialTokenIdERC1155` to include `startTokenId` in its module. - Modified event signatures for `BatchMetadataUpdate` in both ERC721 and ERC1155. - Increased test retry count and max concurrency in `vitest.config.ts`. - Introduced new methods for batch metadata handling, including `getBatchIndex` and `getMetadataBatch`. - Added `setBaseURI` functionality for both `BatchMetadataERC721` and `BatchMetadataERC1155`. - Created parameter encoding functions for `updateTokenIdERC1155`. - Enhanced error handling and configuration retrieval methods in modules. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex -->
- Loading branch information
1 parent
4f346e6
commit cd2c0f3
Showing
24 changed files
with
1,400 additions
and
111 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 @@ | ||
--- | ||
"thirdweb": patch | ||
--- | ||
|
||
Handle zk sync direct deploys in `deployContract` |
6 changes: 5 additions & 1 deletion
6
packages/thirdweb/scripts/generate/abis/modules/BatchMetadataERC1155.json
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,6 +1,10 @@ | ||
[ | ||
"function encodeBytesOnInstall() pure returns (bytes)", | ||
"function getAllMetadataBatches() view returns ((uint256 startTokenIdInclusive, uint256 endTokenIdInclusive, string baseURI)[])", | ||
"function getBatchIndex(uint256 _tokenId) view returns (uint256)", | ||
"function getMetadataBatch(uint256 _batchIndex) view returns ((uint256 startTokenIdInclusive, uint256 endTokenIdInclusive, string baseURI))", | ||
"function getModuleConfig() pure returns ((bool registerInstallationCallback, bytes4[] requiredInterfaces, bytes4[] supportedInterfaces, (bytes4 selector)[] callbackFunctions, (bytes4 selector, uint256 permissionBits)[] fallbackFunctions) config)", | ||
"function setBaseURI(uint256 _batchIndex, string _baseURI)", | ||
"function uploadMetadata(uint256 _amount, string _baseURI)", | ||
"event BatchMetadataUpdate(uint256 _fromTokenId, uint256 _toTokenId)" | ||
"event BatchMetadataUpdate(uint256 startTokenIdIncluside, uint256 endTokenIdInclusive, string baseURI)" | ||
] |
6 changes: 5 additions & 1 deletion
6
packages/thirdweb/scripts/generate/abis/modules/BatchMetadataERC721.json
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,6 +1,10 @@ | ||
[ | ||
"function encodeBytesOnInstall() pure returns (bytes)", | ||
"function getAllMetadataBatches() view returns ((uint256 startTokenIdInclusive, uint256 endTokenIdInclusive, string baseURI)[])", | ||
"function getBatchIndex(uint256 _tokenId) view returns (uint256)", | ||
"function getMetadataBatch(uint256 _batchIndex) view returns ((uint256 startTokenIdInclusive, uint256 endTokenIdInclusive, string baseURI))", | ||
"function getModuleConfig() pure returns ((bool registerInstallationCallback, bytes4[] requiredInterfaces, bytes4[] supportedInterfaces, (bytes4 selector)[] callbackFunctions, (bytes4 selector, uint256 permissionBits)[] fallbackFunctions) config)", | ||
"function setBaseURI(uint256 _batchIndex, string _baseURI)", | ||
"function uploadMetadata(uint256 _amount, string _baseURI)", | ||
"event BatchMetadataUpdate(uint256 _fromTokenId, uint256 _toTokenId)" | ||
"event BatchMetadataUpdate(uint256 startTokenIdIncluside, uint256 endTokenIdInclusive, string baseURI)" | ||
] |
6 changes: 3 additions & 3 deletions
6
packages/thirdweb/scripts/generate/abis/modules/SequentialTokenIdERC1155.json
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,6 +1,6 @@ | ||
[ | ||
"function encodeBytesOnInstall() pure returns (bytes)", | ||
"function encodeBytesOnInstall(uint256 startTokenId) pure returns (bytes)", | ||
"function getModuleConfig() pure returns ((bool registerInstallationCallback, bytes4[] requiredInterfaces, bytes4[] supportedInterfaces, (bytes4 selector)[] callbackFunctions, (bytes4 selector, uint256 permissionBits)[] fallbackFunctions) config)", | ||
"function getNextTokenId() view returns (uint256)", | ||
"error SequentialTokenIdInvalidTokenId()", | ||
"error UpdateTokenIdCallbackERC1155NotImplemented()" | ||
"function updateTokenIdERC1155(uint256 _tokenId) payable returns (uint256)" | ||
] |
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
2 changes: 1 addition & 1 deletion
2
...b/src/extensions/modules/__generated__/BatchMetadataERC1155/events/BatchMetadataUpdate.ts
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
125 changes: 125 additions & 0 deletions
125
.../thirdweb/src/extensions/modules/__generated__/BatchMetadataERC1155/read/getBatchIndex.ts
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
142 changes: 142 additions & 0 deletions
142
...irdweb/src/extensions/modules/__generated__/BatchMetadataERC1155/read/getMetadataBatch.ts
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.