Skip to content

Commit 3c120a7

Browse files
committed
[SDK] Functions to manage extensions on a dynamic contract (#6550)
<!-- ## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes" If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000): ## Notes for the reviewer Anything important to call out? Be sure to also clarify these in your comments. ## How to test Unit tests, playground, etc. --> <!-- start pr-codex --> --- ## PR-Codex overview This PR focuses on enhancing the `thirdweb` library by adding functionality to manage extensions on dynamic contracts, including the ability to install and uninstall extensions. ### Detailed summary - Introduced `uninstallExtension` function to remove extensions from dynamic contracts. - Added `installPublishedExtension` function to install extensions with various options. - Updated `generateExtensionFunctionsFromAbi` to use a specific string format for `functionSelector`. - Enhanced tests for `uninstallExtension` and `installPublishedExtension` to ensure proper functionality. - Updated generated files for `addExtension` and `removeExtension` methods with new parameter types and encoding functions. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex -->
1 parent b51157c commit 3c120a7

File tree

10 files changed

+599
-1
lines changed

10 files changed

+599
-1
lines changed

.changeset/puny-planes-study.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"thirdweb": patch
3+
---
4+
5+
Functions to manage extensions on a dynamic contract
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[
2+
"function addExtension(((string name, string metadataURI, address implementation) metadata, (bytes4 functionSelector, string functionSignature)[] functions) extension)",
3+
"function removeExtension(string extensionName)"
4+
]
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
/**
2+
* Write
3+
*/
4+
export {
5+
installPublishedExtension,
6+
type InstallPublishedExtensionOptions,
7+
} from "../../extensions/dynamic-contracts/write/installPublishedExtension.js";
8+
export {
9+
uninstallExtension,
10+
type UninstallExtensionOptions,
11+
} from "../../extensions/dynamic-contracts/write/uninstallExtension.js";

packages/thirdweb/src/extensions/dynamic-contracts/__generated__/IExtensionManager/write/addExtension.ts

Lines changed: 193 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/thirdweb/src/extensions/dynamic-contracts/__generated__/IExtensionManager/write/removeExtension.ts

Lines changed: 140 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)