-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add onlyEncodeTransactions support #223
add onlyEncodeTransactions support #223
Conversation
Update react-sdk version (storyprotocol#216)
WalkthroughThis update enhances the SDK with new encoding methods for smart contract interactions, improving transaction management and developer flexibility. The ability to encode transaction data without immediate execution facilitates off-chain processing. Additionally, optional properties in response types increase adaptability for scenarios with missing transaction details. Overall, these improvements significantly enhance usability and functionality for developers working with smart contracts. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant SDK
participant SmartContract
User->>SDK: Request to encode transaction
SDK->>SmartContract: Prepare function data
SmartContract-->>SDK: Return encoded transaction
SDK-->>User: Provide encoded transaction
TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Outside diff range, codebase verification and nitpick comments (2)
packages/core-sdk/src/resources/dispute.ts (1)
88-94
: Ensure test coverage forcancelDisputeEncode
.While
waitForTransactionReceipt
has adequate test coverage, there are no tests found forcancelDisputeEncode
. Please add tests to verify the correct handling ofcancelDisputeEncode
.
- Add unit tests for
cancelDisputeEncode
in the appropriate test files.Analysis chain
Ensure proper handling of
cancelDisputeEncode
andwaitForTransactionReceipt
.The introduction of
onlyEncodeTransactions
andwaitForTransaction
options is well-implemented. Make sure thatcancelDisputeEncode
andwaitForTransactionReceipt
are correctly handled and tested.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the usage of `cancelDisputeEncode` and `waitForTransactionReceipt`. # Test: Search for the function usage. Expect: Correct handling of `cancelDisputeEncode` and `waitForTransactionReceipt`. rg --type js -A 5 $'cancelDisputeEncode' rg --type js -A 5 $'waitForTransactionReceipt'Length of output: 85
Script:
#!/bin/bash # Description: Verify the implementation and usage of `cancelDisputeEncode` and `waitForTransactionReceipt`. # Search for the implementation of `cancelDisputeEncode` in TypeScript files rg --type ts 'cancelDisputeEncode' # Search for the implementation of `waitForTransactionReceipt` in TypeScript files rg --type ts 'waitForTransactionReceipt' # Search for the usage of `cancelDisputeEncode` in TypeScript files rg --type ts 'cancelDisputeEncode(' # Search for the usage of `waitForTransactionReceipt` in TypeScript files rg --type ts 'waitForTransactionReceipt('Length of output: 5266
Script:
#!/bin/bash # Description: Verify the implementation and usage of `cancelDisputeEncode` and `waitForTransactionReceipt`. # Search for the implementation of `cancelDisputeEncode` in TypeScript files rg --type ts 'cancelDisputeEncode' # Search for the implementation of `waitForTransactionReceipt` in TypeScript files rg --type ts 'waitForTransactionReceipt' # Search for the usage of `cancelDisputeEncode` in TypeScript files rg --type ts 'cancelDisputeEncode\(' # Search for the usage of `waitForTransactionReceipt` in TypeScript files rg --type ts 'waitForTransactionReceipt\('Length of output: 9054
Script:
#!/bin/bash # Description: Verify the test coverage for `cancelDisputeEncode` and `waitForTransactionReceipt`. # Search for tests related to `cancelDisputeEncode` rg --type ts 'cancelDisputeEncode' --glob '**/*.test.ts' # Search for tests related to `waitForTransactionReceipt` rg --type ts 'waitForTransactionReceipt' --glob '**/*.test.ts'Length of output: 948
packages/core-sdk/src/resources/ipAsset.ts (1)
152-168
: Ensure proper error handling and logging.While the changes are correct, consider adding logging for the transaction hash and other relevant information to aid in debugging and monitoring.
+ console.log(`Transaction hash: ${txHash}`);
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (17)
- packages/core-sdk/src/abi/generated.ts (69 hunks)
- packages/core-sdk/src/resources/dispute.ts (3 hunks)
- packages/core-sdk/src/resources/ipAccount.ts (2 hunks)
- packages/core-sdk/src/resources/ipAsset.ts (6 hunks)
- packages/core-sdk/src/resources/license.ts (6 hunks)
- packages/core-sdk/src/resources/nftClient.ts (2 hunks)
- packages/core-sdk/src/resources/permission.ts (5 hunks)
- packages/core-sdk/src/resources/royalty.ts (4 hunks)
- packages/core-sdk/src/types/options.ts (1 hunks)
- packages/core-sdk/src/types/resources/dispute.ts (3 hunks)
- packages/core-sdk/src/types/resources/ipAccount.ts (2 hunks)
- packages/core-sdk/src/types/resources/ipAsset.ts (6 hunks)
- packages/core-sdk/src/types/resources/license.ts (3 hunks)
- packages/core-sdk/src/types/resources/nftClient.ts (1 hunks)
- packages/core-sdk/src/types/resources/permission.ts (1 hunks)
- packages/core-sdk/src/types/resources/royalty.ts (3 hunks)
- packages/wagmi-generator/sdk.ts (2 hunks)
Additional comments not posted (81)
packages/core-sdk/src/types/resources/nftClient.ts (1)
15-19
: Changes look good.The changes to the
CreateNFTCollectionResponse
type are syntactically correct and align with the intended functionality of makingtxHash
optional and addingencodedTx
as an optional property.packages/core-sdk/src/types/resources/ipAccount.ts (2)
14-15
: Changes look good.The changes to the
IPAccountExecuteResponse
type are syntactically correct and align with the intended functionality of makingtxHash
optional and addingencodedTx
as an optional property.
30-31
: Changes look good.The changes to the
IPAccountExecuteWithSigResponse
type are syntactically correct and align with the intended functionality of makingtxHash
optional and addingencodedTx
as an optional property.packages/core-sdk/src/types/options.ts (1)
9-9
: Changes look good.The addition of the
onlyEncodeTransactions
optional property to theTxOptions
type is syntactically correct and aligns with the intended functionality.packages/core-sdk/src/types/resources/dispute.ts (3)
27-28
: LGTM! But verify the usage ofCancelDisputeResponse
.The changes to make
txHash
optional and addencodedTx
are approved.However, ensure that all usages of
CancelDisputeResponse
handle the optional properties correctly.
38-39
: LGTM! But verify the usage ofResolveDisputeResponse
.The changes to make
txHash
optional and addencodedTx
are approved.However, ensure that all usages of
ResolveDisputeResponse
handle the optional properties correctly.Verification successful
LGTM! The optional properties in
ResolveDisputeResponse
are handled correctly.The usage of
ResolveDisputeResponse
in the codebase ensures that the optional propertiestxHash
andencodedTx
are managed appropriately. The conditional handling indispute.ts
and the return statements inuseDispute.ts
confirm that the changes are correctly integrated.
packages/react-sdk/src/resources/useDispute.ts
packages/core-sdk/src/resources/dispute.ts
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all usages of `ResolveDisputeResponse` handle the optional properties correctly. # Test: Search for the type usage. Expect: Proper handling of optional properties. rg --type typescript -A 5 $'ResolveDisputeResponse'Length of output: 85
Script:
#!/bin/bash # Description: Verify all usages of `ResolveDisputeResponse` handle the optional properties correctly. # Test: Search for the type usage. Expect: Proper handling of optional properties. rg --type ts -A 5 $'ResolveDisputeResponse'Length of output: 4224
Script:
#!/bin/bash # Description: Extract relevant code sections to verify the handling of optional properties in ResolveDisputeResponse. # Extract code sections from useDispute.ts rg --type ts -A 10 -B 5 'ResolveDisputeResponse' packages/react-sdk/src/resources/useDispute.ts # Extract code sections from dispute.ts rg --type ts -A 10 -B 5 'ResolveDisputeResponse' packages/core-sdk/src/resources/dispute.tsLength of output: 3430
15-16
: LGTM! But verify the usage ofRaiseDisputeResponse
.The changes to make
txHash
optional and addencodedTx
are approved.However, ensure that all usages of
RaiseDisputeResponse
handle the optional properties correctly.Verification successful
LGTM! The optional properties
txHash
andencodedTx
inRaiseDisputeResponse
are handled correctly.The tests in
dispute.test.ts
verify the handling of these properties, and the direct return inuseDispute.ts
ensures flexibility for the caller to handle the response appropriately.
packages/core-sdk/test/unit/resources/dispute.test.ts
packages/react-sdk/src/resources/useDispute.ts
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all usages of `RaiseDisputeResponse` handle the optional properties correctly. # Test: Search for the type usage. Expect: Proper handling of optional properties. rg --type typescript -A 5 $'RaiseDisputeResponse'Length of output: 83
Script:
#!/bin/bash # Description: Verify all usages of `RaiseDisputeResponse` handle the optional properties correctly. # Test: Search for the type usage. Expect: Proper handling of optional properties. rg 'RaiseDisputeResponse' -t ts -A 5Length of output: 6221
Script:
#!/bin/bash # Extract relevant code snippets around the usage of `RaiseDisputeResponse` to verify handling of optional properties # Extract code around usage in useDispute.ts rg 'RaiseDisputeResponse' -A 10 packages/react-sdk/src/resources/useDispute.ts # Extract code around usage in dispute.ts rg 'RaiseDisputeResponse' -A 10 packages/core-sdk/src/resources/dispute.tsLength of output: 3173
Script:
#!/bin/bash # Search for further usage of the response from `raiseDispute` in `useDispute.ts` to verify handling of optional properties # Extract code around usage of the response from `raiseDispute` rg 'raiseDispute' -A 10 packages/react-sdk/src/resources/useDispute.tsLength of output: 2099
Script:
#!/bin/bash # Search for calls to `raiseDispute` in the codebase to verify handling of optional properties # Extract code around calls to `raiseDispute` rg 'raiseDispute' -t ts -A 10Length of output: 18334
packages/core-sdk/src/types/resources/permission.ts (1)
15-16
: LGTM! But verify the usage ofSetPermissionsResponse
.The changes to make
txHash
optional and addencodedTx
are approved.However, ensure that all usages of
SetPermissionsResponse
handle the optional properties correctly.Verification successful
LGTM! But verify the usage of
SetPermissionsResponse
.The changes to make
txHash
optional and addencodedTx
are approved.However, ensure that all usages of
SetPermissionsResponse
handle the optional properties correctly. The verification confirms that the optional propertiestxHash
andencodedTx
are handled correctly in the identified methods.
packages/core-sdk/src/resources/permission.ts
: Proper handling oftxHash
andencodedTx
.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all usages of `SetPermissionsResponse` handle the optional properties correctly. # Test: Search for the type usage. Expect: Proper handling of optional properties. rg --type typescript -A 5 $'SetPermissionsResponse'Length of output: 85
Script:
#!/bin/bash # Description: Verify all usages of `SetPermissionsResponse` handle the optional properties correctly. # Test: Search for the type usage. Expect: Proper handling of optional properties. rg -A 5 'SetPermissionsResponse'Length of output: 7673
Script:
#!/bin/bash # Description: Verify handling of optional properties `txHash` and `encodedTx` in `SetPermissionsResponse`. # Test: Search for `txHash` usage in the identified files. rg 'txHash' packages/core-sdk/src/resources/permission.ts packages/react-sdk/src/resources/usePermission.ts # Test: Search for `encodedTx` usage in the identified files. rg 'encodedTx' packages/core-sdk/src/resources/permission.ts packages/react-sdk/src/resources/usePermission.tsLength of output: 2974
packages/core-sdk/src/types/resources/royalty.ts (4)
31-32
: LGTM! But verify the usage ofCollectRoyaltyTokensResponse
.The changes to make
txHash
optional and addencodedTx
are approved.However, ensure that all usages of
CollectRoyaltyTokensResponse
handle the optional properties correctly.
86-87
: LGTM! But verify the usage ofSnapshotResponse
.The changes to make
txHash
optional and addencodedTx
are approved.However, ensure that all usages of
SnapshotResponse
handle the optional properties correctly.Verification successful
Verified: The optional properties
txHash
andencodedTx
inSnapshotResponse
are handled correctly in the codebase.
- In
packages/react-sdk/src/resources/useRoyalty.ts
, thesnapshot
function returns the response directly fromclient.royalty.snapshot(request)
, ensuring proper handling.- In
packages/core-sdk/src/resources/royalty.ts
, thesnapshot
method of theRoyaltyClient
class includes logic to conditionally handleencodedTx
andtxHash
based onrequest.txOptions
.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all usages of `SnapshotResponse` handle the optional properties correctly. # Test: Search for the type usage. Expect: Proper handling of optional properties. rg --type typescript -A 5 $'SnapshotResponse'Length of output: 79
Script:
#!/bin/bash # Description: Verify all usages of `SnapshotResponse` handle the optional properties correctly. # Test: Search for the type usage. Expect: Proper handling of optional properties. rg 'SnapshotResponse' -t ts -A 5Length of output: 3105
Script:
#!/bin/bash # Description: Extract and review the context around the usage of `SnapshotResponse` in the identified files. # Test: Search for the type usage and extract context. Expect: Proper handling of optional properties. rg 'SnapshotResponse' -t ts -A 15 -B 5Length of output: 10141
62-63
: LGTM! But verify the usage ofPayRoyaltyOnBehalfResponse
.The changes to make
txHash
optional and addencodedTx
are approved.However, ensure that all usages of
PayRoyaltyOnBehalfResponse
handle the optional properties correctly.Verification successful
LGTM! The optional properties
txHash
andencodedTx
are handled correctly in the codebase.
- The optional properties are conditionally assigned based on the presence of
txOptions
inpackages/core-sdk/src/resources/royalty.ts
.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all usages of `PayRoyaltyOnBehalfResponse` handle the optional properties correctly. # Test: Search for the type usage. Expect: Proper handling of optional properties. rg --type typescript -A 5 $'PayRoyaltyOnBehalfResponse'Length of output: 89
Script:
#!/bin/bash # Description: Verify all usages of `PayRoyaltyOnBehalfResponse` handle the optional properties correctly. # Test: Search for the type usage. Expect: Proper handling of optional properties. rg --type-add 'ts:*.ts' -t ts -A 5 $'PayRoyaltyOnBehalfResponse'Length of output: 3144
Script:
#!/bin/bash # Description: Verify handling of optional properties in `PayRoyaltyOnBehalfResponse`. # Extract more context around the usages in `useRoyalty.ts` and `royalty.ts`. rg --type-add 'ts:*.ts' -t ts -A 10 -B 10 $'PayRoyaltyOnBehalfResponse' packages/react-sdk/src/resources/useRoyalty.ts packages/core-sdk/src/resources/royalty.tsLength of output: 6816
Script:
#!/bin/bash # Description: Verify handling of optional properties `txHash` and `encodedTx`. # Search for references to `txHash` and `encodedTx` in the relevant files. rg --type-add 'ts:*.ts' -t ts -A 5 -B 5 $'txHash' packages/react-sdk/src/resources/useRoyalty.ts packages/core-sdk/src/resources/royalty.ts rg --type-add 'ts:*.ts' -t ts -A 5 -B 5 $'encodedTx' packages/react-sdk/src/resources/useRoyalty.ts packages/core-sdk/src/resources/royalty.tsLength of output: 12510
80-81
: LGTM! But verify the usage ofClaimRevenueResponse
.The changes to make
txHash
optional and addencodedTx
are approved.However, ensure that all usages of
ClaimRevenueResponse
handle the optional properties correctly.packages/core-sdk/src/types/resources/license.ts (3)
43-43
: LGTM! Addition ofencodedTx
enhances flexibility.The addition of the optional
encodedTx
property inRegisterPILResponse
aligns with the goal of improving flexibility for off-chain transaction handling.
67-68
: LGTM! Enhancements improve response flexibility.Making
txHash
optional and adding the optionalencodedTx
property inAttachLicenseTermsResponse
enhances the flexibility of the response type.
84-84
: LGTM! Addition ofencodedTx
standardizes responses.The addition of the optional
encodedTx
property inMintLicenseTokensResponse
standardizes the response format across different licensing operations.packages/core-sdk/src/types/resources/ipAsset.ts (6)
16-16
: LGTM! Addition ofencodedTx
enhances flexibility.The addition of the optional
encodedTx
property inRegisterIpResponse
aligns with the goal of improving flexibility for off-chain transaction handling.
34-35
: LGTM! Enhancements improve response flexibility.Making
txHash
optional and adding the optionalencodedTx
property inRegisterDerivativeWithLicenseTokensResponse
enhances the flexibility of the response type.
48-48
: LGTM! Addition ofencodedTx
enhances flexibility.The addition of the optional
encodedTx
property inRegisterDerivativeResponse
aligns with the goal of improving flexibility for off-chain transaction handling.
63-64
: LGTM! Enhancements improve response flexibility.Making
txHash
optional and adding the optionalencodedTx
property inCreateIpAssetWithPilTermsResponse
enhances the flexibility of the response type.
83-84
: LGTM! Enhancements improve response flexibility.Making
txHash
optional and adding the optionalencodedTx
property inRegisterIpAndMakeDerivativeResponse
enhances the flexibility of the response type.
100-101
: LGTM! Enhancements improve response flexibility.Making
txHash
optional and adding the optionalencodedTx
property inRegisterIpAndAttachPilTermsResponse
enhances the flexibility of the response type.packages/core-sdk/src/resources/nftClient.ts (3)
Line range hint
46-55
:
LGTM! Construction ofreq
object is clear and concise.The construction of the
req
object encapsulates the request parameters effectively and includes default values where necessary.
57-59
: LGTM! Conditional check foronlyEncodeTransactions
is implemented correctly.The conditional check for
request.txOptions?.onlyEncodeTransactions
ensures that the method returns an encoded transaction if this option is enabled.
60-70
: LGTM! Handling of transaction hash and waiting for transaction receipt is well-implemented.The method correctly handles the transaction hash and waits for the transaction receipt if
request.txOptions?.waitForTransaction
is true. The logic for parsing the logs and returning the transaction hash and NFT contract address is clear and concise.packages/core-sdk/src/resources/ipAccount.ts (4)
43-47
: LGTM! But verify the function usage in the codebase.The code changes are approved.
However, ensure that all function calls to
execute
match the new logic and handle thetxOptions
correctly.
85-93
: LGTM! But verify the function usage in the codebase.The code changes are approved.
However, ensure that all function calls to
executeWithSig
match the new logic and handle thetxOptions
correctly.Verification successful
Let's perform a more comprehensive search to verify all usages of the
executeWithSig
function in the codebase.
Let's perform a more comprehensive search to verify all usages of the
executeWithSig
function in the codebase by searching across all file types.
Function usage verified successfully.
The function
executeWithSig
is used correctly across the codebase, including in integration and unit tests, as well as in resource files. The new logic and handling oftxOptions
are consistent throughout the codebase.
packages/react-sdk/src/resources/useIpAccount.ts
packages/core-sdk/src/resources/permission.ts
packages/core-sdk/src/resources/ipAccount.ts
packages/core-sdk/test/integration/ipAccount.test.ts
packages/core-sdk/test/unit/resources/permission.test.ts
packages/core-sdk/test/unit/resources/ipAccount.test.ts
packages/core-sdk/src/abi/generated.ts
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all function calls to `executeWithSig` match the new logic. # Test: Search for the function usage. Expect: Only occurrences of the new logic. rg --type js -A 5 $'executeWithSig'Length of output: 34
Script:
#!/bin/bash # Description: Verify all function calls to `executeWithSig` match the new logic. # Search for the function definition and its usages in the codebase ast-grep --lang typescript --pattern 'executeWithSig($_$)'Length of output: 60
Script:
#!/bin/bash # Description: Verify all function calls to `executeWithSig` match the new logic. # Search for the function definition and its usages in the codebase across all file types rg 'executeWithSig'Length of output: 4577
94-101
: Ensure proper handling ofexecuteWithSigEncode
andwaitForTransactionReceipt
.The introduction of
onlyEncodeTransactions
andwaitForTransaction
options is well-implemented. Make sure thatexecuteWithSigEncode
andwaitForTransactionReceipt
are correctly handled and tested.
49-56
: Ensure proper handling ofexecuteEncode
andwaitForTransactionReceipt
.The introduction of
onlyEncodeTransactions
andwaitForTransaction
options is well-implemented. Make sure thatexecuteEncode
andwaitForTransactionReceipt
are correctly handled and tested.packages/core-sdk/src/resources/dispute.ts (5)
115-119
: LGTM! But verify the function usage in the codebase.The code changes are approved.
However, ensure that all function calls to
resolveDispute
match the new logic and handle thetxOptions
correctly.
49-61
: Ensure proper handling ofraiseDisputeEncode
andwaitForTransactionReceipt
.The introduction of
onlyEncodeTransactions
andwaitForTransaction
options is well-implemented. Make sure thatraiseDisputeEncode
andwaitForTransactionReceipt
are correctly handled and tested.Verification successful
Proper handling of
raiseDisputeEncode
andwaitForTransactionReceipt
confirmed.The functions
raiseDisputeEncode
andwaitForTransactionReceipt
are correctly defined and used across multiple files. Their presence in test files indicates they are being tested.
- Definition of
raiseDisputeEncode
:packages/core-sdk/src/abi/generated.ts
- Usages of
waitForTransactionReceipt
:packages/core-sdk/src/resources/dispute.ts
,packages/core-sdk/src/resources/ipAsset.ts
,packages/core-sdk/src/resources/royalty.ts
,packages/core-sdk/src/resources/license.ts
, and others.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the usage of `raiseDisputeEncode` and `waitForTransactionReceipt`. # Test: Search for the function usage. Expect: Correct handling of `raiseDisputeEncode` and `waitForTransactionReceipt`. rg --type js -A 5 $'raiseDisputeEncode' rg --type js -A 5 $'waitForTransactionReceipt'Length of output: 84
Script:
#!/bin/bash # Description: Verify the usage and definition of `raiseDisputeEncode` and `waitForTransactionReceipt`. # Search for the definition and usage of `raiseDisputeEncode` across all file types, including more context lines. rg -A 10 'raiseDisputeEncode' # Search for the definition and usage of `waitForTransactionReceipt` across all file types, including more context lines. rg -A 10 'waitForTransactionReceipt'Length of output: 31368
42-47
: LGTM! But verify the function usage in the codebase.The code changes are approved.
However, ensure that all function calls to
raiseDispute
match the new logic and handle thetxOptions
correctly.
83-87
: LGTM! But verify the function usage in the codebase.The code changes are approved.
However, ensure that all function calls to
cancelDispute
match the new logic and handle thetxOptions
correctly.
120-126
: Ensure proper handling ofresolveDisputeEncode
andwaitForTransactionReceipt
.The introduction of
onlyEncodeTransactions
andwaitForTransaction
options is well-implemented. Make sure thatresolveDisputeEncode
andwaitForTransactionReceipt
are correctly handled and tested.Verification successful
The handling of
resolveDisputeEncode
andwaitForTransactionReceipt
is correct.The functions
resolveDisputeEncode
andwaitForTransactionReceipt
are properly implemented and used in the codebase.
resolveDisputeEncode
correctly encodes transaction data using the provided ABI and function name.waitForTransactionReceipt
is used to handle the transaction receipt and extract relevant logs.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the usage of `resolveDisputeEncode` and `waitForTransactionReceipt`. # Test: Search for the function usage. Expect: Correct handling of `resolveDisputeEncode` and `waitForTransactionReceipt`. rg --type js -A 5 $'resolveDisputeEncode' rg --type js -A 5 $'waitForTransactionReceipt'Length of output: 86
Script:
#!/bin/bash # Search for the definitions of `resolveDisputeEncode` and `waitForTransactionReceipt`. rg 'resolveDisputeEncode' --type js -A 5 rg 'waitForTransactionReceipt' --type js -A 5 # Search for any usages of `resolveDisputeEncode` and `waitForTransactionReceipt` in the codebase. rg 'resolveDisputeEncode' --type js rg 'waitForTransactionReceipt' --type jsLength of output: 163
Script:
#!/bin/bash # Search for the definitions of `resolveDisputeEncode` and `waitForTransactionReceipt` using ast-grep for more accurate results. ast-grep --lang typescript --pattern 'function resolveDisputeEncode($_) { $$$ }' ast-grep --lang typescript --pattern 'function waitForTransactionReceipt($_) { $$$ }' # Search for any usages of `resolveDisputeEncode` and `waitForTransactionReceipt` in the codebase using rg with broader parameters. rg 'resolveDisputeEncode' rg 'waitForTransactionReceipt'Length of output: 5145
Script:
#!/bin/bash # Extract the implementation of `resolveDisputeEncode` from `generated.ts`. rg 'resolveDisputeEncode' -A 10 packages/core-sdk/src/abi/generated.ts # Extract the relevant sections of `dispute.ts` to review the usage of `waitForTransactionReceipt`. rg 'waitForTransactionReceipt' -A 10 packages/core-sdk/src/resources/dispute.tsLength of output: 1352
packages/core-sdk/src/resources/royalty.ts (4)
120-135
: LGTM! But verify the function usage in the codebase.The code changes are approved.
However, ensure that all function calls to
payRoyaltyOnBehalf
match the new logic and handle thetxOptions
correctly.
71-87
: LGTM! But verify the function usage in the codebase.The code changes are approved.
However, ensure that all function calls to
collectRoyaltyTokens
match the new logic and handle thetxOptions
correctly.Verification successful
LGTM! But verify the function usage in the codebase.
The code changes are approved.
The function
collectRoyaltyTokens
is used across the codebase, and the new logic involvingtxOptions
is correctly integrated and tested.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all function calls to `collectRoyaltyTokens` match the new logic. # Test: Search for the function usage. Expect: Only occurrences of the new logic. rg --type js -A 5 $'collectRoyaltyTokens'Length of output: 40
Script:
#!/bin/bash # Description: Verify all function calls to `collectRoyaltyTokens` match the new logic. # Test: Search for the function usage. Expect: Only occurrences of the new logic. ast-grep --lang typescript --pattern 'collectRoyaltyTokens($_$)'Length of output: 66
Script:
#!/bin/bash # Description: Verify all function calls to `collectRoyaltyTokens` match the new logic. # Test: Search for the function usage. Expect: Only occurrences of the new logic. rg 'collectRoyaltyTokens' -A 5Length of output: 16703
202-222
: LGTM! But verify the function usage in the codebase.The code changes are approved.
However, ensure that all function calls to
claimRevenue
match the new logic and handle thetxOptions
correctly.
255-265
: LGTM! But verify the function usage in the codebase.The code changes are approved.
However, ensure that all function calls to
snapshot
match the new logic and handle thetxOptions
correctly.Verification successful
Let's re-verify the function usage by using
ast-grep
to search for calls to thesnapshot
function.
Let's search for the
snapshot
function definition and its export status to ensure it is being used correctly.
Let's expand our search to include method definitions within classes or objects.
Let's search for all instances of the term
snapshot
in the codebase to gather more context.
LGTM! But verify the function usage in the codebase.
The code changes are approved.
The
snapshot
function is defined and used correctly across the codebase, including in various test files that handle differenttxOptions
.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all function calls to `snapshot` match the new logic. # Test: Search for the function usage. Expect: Only occurrences of the new logic. rg --type js -A 5 $'snapshot'Length of output: 28
Script:
#!/bin/bash # Description: Verify all function calls to `snapshot` match the new logic. # Test: Search for the function usage. Expect: Only occurrences of the new logic. ast-grep --lang typescript --pattern '$_.$snapshot($_)'Length of output: 57
Script:
#!/bin/bash # Description: Verify the definition and export status of the `snapshot` function. # Search for the `snapshot` function definition. ast-grep --lang typescript --pattern 'function snapshot($_) { $$$ }' # Search for the export status of the `snapshot` function. ast-grep --lang typescript --pattern 'export function snapshot($_) { $$$ }'Length of output: 148
Script:
#!/bin/bash # Description: Verify the definition of the `snapshot` method within classes or objects. # Search for the `snapshot` method definition within classes. ast-grep --lang typescript --pattern 'class $_ { $$$ snapshot($_) { $$$ } $$$ }' # Search for the `snapshot` method definition within objects. ast-grep --lang typescript --pattern '$_ = { $$$ snapshot($_) { $$$ } $$$ }'Length of output: 161
Script:
#!/bin/bash # Description: Search for all instances of the term `snapshot` in the codebase to gather more context. # Search for all instances of the term `snapshot`. rg --type js --type ts -A 5 'snapshot'Length of output: 44020
packages/core-sdk/src/resources/permission.ts (4)
141-159
: LGTM! But verify the function usage in the codebase.The code changes are approved.
However, ensure that all function calls to
createSetPermissionSignature
match the new structure.
180-194
: LGTM! But verify the function usage in the codebase.The code changes are approved.
However, ensure that all function calls to
setAllPermissions
match the new structure.Verification successful
All function calls to
setAllPermissions
match the new structure.The code changes are consistent and no further issues were found.
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all function calls to `setAllPermissions` match the new structure. # Test: Search for the function usage. Expect: Only occurrences of the new structure. rg --type js -A 5 $'setAllPermissions'Length of output: 37
Script:
#!/bin/bash # Description: Verify all function calls to `accessControllerClient.setAllPermissions` match the new structure. # Test: Search for the function usage in both JavaScript and TypeScript files. rg --type-add 'ts' --type-add 'tsx' -tjs -tts -ttsx -A 5 'accessControllerClient.setAllPermissions'Length of output: 155
Script:
#!/bin/bash # Description: Verify all function calls to `accessControllerClient.setAllPermissions` match the new structure. # Test: Search for the function usage in both JavaScript and TypeScript files. rg --type-add 'ts:*.ts' --type-add 'tsx:*.tsx' -tjs -tts -ttsx -A 5 'accessControllerClient.setAllPermissions'Length of output: 897
222-240
: LGTM! But verify the function usage in the codebase.The code changes are approved.
However, ensure that all function calls to
setBatchPermissions
match the new structure.Verification successful
LGTM! But verify the function usage in the codebase.
The code changes are approved.
All function calls to
setBatchPermissions
match the new structure.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all function calls to `setBatchPermissions` match the new structure. # Test: Search for the function usage. Expect: Only occurrences of the new structure. rg --type js -A 5 $'setBatchPermissions'Length of output: 39
Script:
#!/bin/bash # Description: Verify all function calls to `setBatchPermissions` match the new structure. # Test: Search for the function usage in both JavaScript and TypeScript files. rg --type-add 'ts:*.ts' --type-add 'tsx:*.tsx' --type-add 'js:*.js' -tjs -tts -ttsx -A 5 $'setBatchPermissions'Length of output: 13374
68-86
: LGTM! But verify the function usage in the codebase.The code changes are approved.
However, ensure that all function calls to
setPermission
match the new structure.packages/core-sdk/src/resources/license.ts (5)
113-128
: LGTM! But verify the function usage in the codebase.The code changes are approved.
However, ensure that all function calls to
registerCommercialUsePIL
match the new structure.Verification successful
LGTM! All usages of
registerCommercialUsePIL
match the new structure.The code changes are approved.
- Verified function usage in:
packages/core-sdk/test/integration/license.test.ts
packages/core-sdk/test/unit/resources/license.test.ts
packages/react-sdk/test/integration/useRoyalty.test.ts
packages/react-sdk/src/resources/useLicense.ts
packages/react-sdk/test/integration/useLicense.test.ts
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all function calls to `registerCommercialUsePIL` match the new structure. # Test: Search for the function usage. Expect: Only occurrences of the new structure. rg --type js -A 5 $'registerCommercialUsePIL'Length of output: 44
Script:
#!/bin/bash # Description: Verify all function calls to `registerCommercialUsePIL` match the new structure. # Test: Search for the function usage across all file types. rg -A 5 'registerCommercialUsePIL'Length of output: 9979
Line range hint
293-318
:
LGTM! But verify the function usage in the codebase.The code changes are approved.
However, ensure that all function calls to
mintLicenseTokens
match the new structure.
70-85
: LGTM! But verify the function usage in the codebase.The code changes are approved.
However, ensure that all function calls to
registerNonComSocialRemixingPIL
match the new structure.
218-232
: LGTM! But verify the function usage in the codebase.The code changes are approved.
However, ensure that all function calls to
attachLicenseTerms
match the new structure.
158-173
: LGTM! But verify the function usage in the codebase.The code changes are approved.
However, ensure that all function calls to
registerCommercialRemixPIL
match the new structure.Verification successful
Let's first locate the definition of the
registerCommercialRemixPIL
function and then search for its usage.
The function
registerCommercialRemixPIL
is being used in multiple places, particularly in test files. Let's inspect these usages to ensure they match the new structure.
The function usage of
registerCommercialRemixPIL
matches the new structure.The function
registerCommercialRemixPIL
is used in various test and source files, and the usages align with the new structure introduced in the code snippet. The function handles transaction options and error cases appropriately.
packages/core-sdk/test/unit/resources/license.test.ts
packages/core-sdk/test/integration/license.test.ts
packages/core-sdk/test/integration/royalty.test.ts
packages/react-sdk/test/integration/useLicense.test.ts
packages/react-sdk/src/resources/useLicense.ts
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all function calls to `registerCommercialRemixPIL` match the new structure. # Test: Search for the function usage. Expect: Only occurrences of the new structure. rg --type js -A 5 $'registerCommercialRemixPIL'Length of output: 46
Script:
#!/bin/bash # Locate the definition of the `registerCommercialRemixPIL` function ast-grep --lang typescript --pattern 'function registerCommercialRemixPIL($_) { $$$ }' # Once located, search for its usage across the codebase rg 'registerCommercialRemixPIL'Length of output: 2956
Script:
#!/bin/bash # Locate the definition of `registerCommercialRemixPIL` within classes or objects ast-grep --lang typescript --pattern 'class $_ { $$$ registerCommercialRemixPIL($_) { $$$ } $$$ }' # Verify the usage in the identified files to ensure they match the new structure rg --type ts -A 5 'registerCommercialRemixPIL' packages/core-sdk/test/unit/resources/license.test.ts rg --type ts -A 5 'registerCommercialRemixPIL' packages/core-sdk/test/integration/license.test.ts rg --type ts -A 5 'registerCommercialRemixPIL' packages/core-sdk/test/integration/royalty.test.ts rg --type ts -A 5 'registerCommercialRemixPIL' packages/react-sdk/test/integration/useLicense.test.ts rg --type ts -A 5 'registerCommercialRemixPIL' packages/react-sdk/src/resources/useLicense.tsLength of output: 4695
packages/wagmi-generator/sdk.ts (2)
242-277
: LGTM! The new function is well-structured and documented.The code changes are approved.
454-457
: LGTM! The integration of the new function enhances the SDK's functionality.The code changes are approved.
packages/core-sdk/src/resources/ipAsset.ts (6)
139-150
: Add support for encoding transactions without executing them.The changes correctly add support for encoding transactions without executing them by checking
request.txOptions?.onlyEncodeTransactions
. The logic is clear and maintains the original functionality.
224-240
: Add support for encoding transactions without executing them.The changes correctly add support for encoding transactions without executing them by checking
request.txOptions?.onlyEncodeTransactions
. The logic is clear and maintains the original functionality.
275-291
: Add support for encoding transactions without executing them.The changes correctly add support for encoding transactions without executing them by checking
request.txOptions?.onlyEncodeTransactions
. The logic is clear and maintains the original functionality.
354-371
: Add support for encoding transactions without executing them.The changes correctly add support for encoding transactions without executing them by checking
request.txOptions?.onlyEncodeTransactions
. The logic is clear and maintains the original functionality.
485-494
: Add support for encoding transactions without executing them.The changes correctly add support for encoding transactions without executing them by checking
request.txOptions?.onlyEncodeTransactions
. The logic is clear and maintains the original functionality.
631-640
: Add support for encoding transactions without executing them.The changes correctly add support for encoding transactions without executing them by checking
request.txOptions?.onlyEncodeTransactions
. The logic is clear and maintains the original functionality.packages/core-sdk/src/abi/generated.ts (27)
15-15
: Import statement looks good.The import for
encodeFunctionData
is correct and necessary for the new encoding methods.
7578-7590
: Method implementation looks good.The
setAllPermissionsEncode
method correctly encodes the parameters for thesetAllPermissions
function.
7611-7623
: Method implementation looks good.The
setBatchPermissionsEncode
method correctly encodes the parameters for thesetBatchPermissions
function.
7643-7656
: Method implementation looks good.The
setPermissionEncode
method correctly encodes the parameters for thesetPermission
function.
8023-8035
: Method implementation looks good.The
freezeMetadataEncode
method correctly encodes the parameters for thefreezeMetadata
function.
8054-8066
: Method implementation looks good.The
setAllEncode
method correctly encodes the parameters for thesetAll
function.
8087-8099
: Method implementation looks good.The
setMetadataUriEncode
method correctly encodes the parameters for thesetMetadataURI
function.
8119-8132
: Method implementation looks good.The
updateNftTokenUriEncode
method correctly encodes the parameters for theupdateNftTokenURI
function.
8381-8393
: Method implementation looks good.The
cancelDisputeEncode
method correctly encodes the parameters for thecancelDispute
function.
8414-8426
: Method implementation looks good.The
raiseDisputeEncode
method correctly encodes the parameters for theraiseDispute
function.
8446-8459
: Method implementation looks good.The
resolveDisputeEncode
method correctly encodes the parameters for theresolveDispute
function.
8553-8565
: Method implementation looks good.The
executeEncode
method correctly encodes the parameters for theexecute
function.
8592-8612
: Method implementation looks good.The
executeWithSigEncode
method correctly encodes the parameters for theexecuteWithSig
function.
8857-8870
: Method implementation looks good.The
registerEncode
method correctly encodes the parameters for theregister
function.
9166-9180
: Method implementation looks good.The
claimRevenueBySnapshotBatchEncode
method correctly encodes the parameters for theclaimRevenueBySnapshotBatch
function.
9201-9215
: Method implementation looks good.The
claimRevenueByTokenBatchEncode
method correctly encodes the parameters for theclaimRevenueByTokenBatch
function.
9236-9248
: Method implementation looks good.The
collectRoyaltyTokensEncode
method correctly encodes the parameters for thecollectRoyaltyTokens
function.
9265-9277
: Method implementation looks good.The
snapshotEncode
method correctly encodes the parameters for thesnapshot
function.
10480-10492
: Method implementation looks good.The
attachLicenseTermsToIpEncode
method correctly encodes the parameters for theattachLicenseTermsToIp
function.
10513-10525
: Method implementation looks good.The
initializeEncode
method correctly encodes the parameters for theinitialize
function.
10551-10568
: Method implementation looks good.The
registerDerivativeIpEncode
method correctly encodes the parameters for theregisterDerivativeIp
function.
10589-10603
: Method implementation looks good.The
registerLicenseTemplateEncode
method correctly encodes the parameters for theregisterLicenseTemplate
function.
10624-10636
: Method implementation looks good.The
setAuthorityEncode
method correctly encodes the parameters for thesetAuthority
function.
10657-10669
: Method implementation looks good.The
setDefaultLicenseTermsEncode
method correctly encodes the parameters for thesetDefaultLicenseTerms
function.
10690-10702
: Method implementation looks good.The
setExpireTimeEncode
method correctly encodes the parameters for thesetExpireTime
function.
10724-10737
: Method implementation looks good.The
setLicensingConfigForIpEncode
method correctly encodes the parameters for thesetLicensingConfigForIp
function.
10763-10782
: Method implementation looks good.The
setLicensingConfigForLicenseEncode
method correctly encodes the parameters for thesetLicensingConfigForLicense
function.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (9)
- packages/core-sdk/src/abi/generated.ts (71 hunks)
- packages/core-sdk/src/types/resources/dispute.ts (4 hunks)
- packages/core-sdk/src/types/resources/ipAccount.ts (3 hunks)
- packages/core-sdk/src/types/resources/ipAsset.ts (7 hunks)
- packages/core-sdk/src/types/resources/license.ts (4 hunks)
- packages/core-sdk/src/types/resources/nftClient.ts (2 hunks)
- packages/core-sdk/src/types/resources/permission.ts (2 hunks)
- packages/core-sdk/src/types/resources/royalty.ts (4 hunks)
- packages/wagmi-generator/sdk.ts (3 hunks)
Additional comments not posted (56)
packages/core-sdk/src/types/resources/nftClient.ts (1)
16-20
: LGTM! Ensure the new properties are utilized correctly.The changes to make
txHash
optional and addencodedTx
of typeMethodEncode
are approved.However, ensure that the new properties are utilized correctly throughout the codebase.
packages/core-sdk/src/types/resources/ipAccount.ts (2)
31-32
: LGTM! Ensure the new properties are utilized correctly.The changes to make
txHash
optional and addencodedTx
of typeMethodEncode
are approved.However, ensure that the new properties are utilized correctly throughout the codebase.
Verification successful
The new properties
txHash
andencodedTx
are utilized correctly.The changes to make
txHash
optional and addencodedTx
of typeMethodEncode
are consistent and correctly implemented in the codebase.
txHash
is used and returned correctly inpackages/core-sdk/src/resources/ipAccount.ts
.encodedTx
is used and returned correctly inpackages/core-sdk/src/resources/ipAccount.ts
.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the usage of the new properties in IPAccountExecuteWithSigResponse. # Test: Search for the usage of IPAccountExecuteWithSigResponse. Expect: Correct usage of the new properties. rg --type typescript -A 5 $'IPAccountExecuteWithSigResponse'Length of output: 94
Script:
#!/bin/bash # Description: Verify the usage of the new properties in IPAccountExecuteWithSigResponse. # Test: Search for the usage of IPAccountExecuteWithSigResponse. Expect: Correct usage of the new properties. rg --type ts -A 5 'IPAccountExecuteWithSigResponse'Length of output: 3105
Script:
#!/bin/bash # Description: Verify the usage of the new properties `txHash` and `encodedTx` in relevant files. # Test: Search for the usage of `txHash` and `encodedTx`. Expect: Correct usage of the new properties. rg --type ts 'txHash' packages/react-sdk/src/index.ts packages/core-sdk/src/types/resources/ipAccount.ts packages/core-sdk/src/index.ts packages/core-sdk/src/resources/ipAccount.ts packages/react-sdk/src/resources/useIpAccount.ts rg --type ts 'encodedTx' packages/react-sdk/src/index.ts packages/core-sdk/src/types/resources/ipAccount.ts packages/core-sdk/src/index.ts packages/core-sdk/src/resources/ipAccount.ts packages/react-sdk/src/resources/useIpAccount.tsLength of output: 1606
15-16
: LGTM! Ensure the new properties are utilized correctly.The changes to make
txHash
optional and addencodedTx
of typeMethodEncode
are approved.However, ensure that the new properties are utilized correctly throughout the codebase.
Verification successful
The new properties
txHash
andencodedTx
are utilized correctly in the codebase.
txHash
is appropriately awaited and returned inpackages/core-sdk/src/resources/ipAccount.ts
.encodedTx
is correctly returned inpackages/core-sdk/src/resources/ipAccount.ts
.No issues were found with the usage of these properties.
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the usage of the new properties in IPAccountExecuteResponse. # Test: Search for the usage of IPAccountExecuteResponse. Expect: Correct usage of the new properties. rg --type typescript -A 5 $'IPAccountExecuteResponse'Length of output: 87
Script:
#!/bin/bash # Description: Verify the usage of the new properties in IPAccountExecuteResponse. # Test: Search for the usage of IPAccountExecuteResponse. Expect: Correct usage of the new properties. rg --glob '*.ts' -A 5 'IPAccountExecuteResponse'Length of output: 3271
Script:
#!/bin/bash # Description: Verify the usage of the new properties in IPAccountExecuteResponse. # Test: Search for the usage of the properties `txHash` and `encodedTx` in the relevant files. rg --glob '*.ts' -A 5 'txHash' packages/core-sdk/src/resources/ipAccount.ts packages/react-sdk/src/resources/useIpAccount.ts rg --glob '*.ts' -A 5 'encodedTx' packages/core-sdk/src/resources/ipAccount.ts packages/react-sdk/src/resources/useIpAccount.tsLength of output: 3064
packages/core-sdk/src/types/resources/dispute.ts (3)
28-29
: LGTM! Ensure the new properties are utilized correctly.The changes to make
txHash
optional and addencodedTx
of typeMethodEncode
are approved.However, ensure that the new properties are utilized correctly throughout the codebase.
16-17
: LGTM! Ensure the new properties are utilized correctly.The changes to make
txHash
optional and addencodedTx
of typeMethodEncode
are approved.However, ensure that the new properties are utilized correctly throughout the codebase.
Verification successful
LGTM! Ensure the new properties are utilized correctly.
The changes to make
txHash
optional and addencodedTx
of typeMethodEncode
are approved.
- The properties
txHash
andencodedTx
are widely referenced across the codebase, indicating their correct integration.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the usage of the new properties in RaiseDisputeResponse. # Test: Search for the usage of RaiseDisputeResponse. Expect: Correct usage of the new properties. rg --type typescript -A 5 $'RaiseDisputeResponse'Length of output: 83
Script:
#!/bin/bash # Description: Verify the usage of the new properties in RaiseDisputeResponse. # Test: Search for the usage of RaiseDisputeResponse. Expect: Correct usage of the new properties. rg -A 5 'RaiseDisputeResponse'Length of output: 6221
Script:
#!/bin/bash # Description: Verify the usage of the new properties `txHash` and `encodedTx` in RaiseDisputeResponse. # Test: Search for the usage of `txHash` and `encodedTx`. Expect: Correct usage of the new properties. rg 'txHash' -A 5 rg 'encodedTx' -A 5Length of output: 182511
39-40
: LGTM! Ensure the new properties are utilized correctly.The changes to make
txHash
optional and addencodedTx
of typeMethodEncode
are approved.However, ensure that the new properties are utilized correctly throughout the codebase.
packages/core-sdk/src/types/resources/permission.ts (2)
16-16
: Change approved:txHash
property made optional.This change allows for flexibility in scenarios where the transaction hash may not be available.
17-17
: Change approved:encodedTx
property added.This addition enhances the functionality by providing encoded transaction data, which can be useful for off-chain handling.
packages/core-sdk/src/types/resources/royalty.ts (8)
32-32
: Change approved:txHash
property made optional.This change allows for flexibility in scenarios where the transaction hash may not be available.
33-33
: Change approved:encodedTx
property added.This addition enhances the functionality by providing encoded transaction data, which can be useful for off-chain handling.
63-63
: Change approved:txHash
property made optional.This change allows for flexibility in scenarios where the transaction hash may not be available.
64-64
: Change approved:encodedTx
property added.This addition enhances the functionality by providing encoded transaction data, which can be useful for off-chain handling.
81-81
: Change approved:txHash
property made optional.This change allows for flexibility in scenarios where the transaction hash may not be available.
82-82
: Change approved:encodedTx
property added.This addition enhances the functionality by providing encoded transaction data, which can be useful for off-chain handling.
87-87
: Change approved:txHash
property made optional.This change allows for flexibility in scenarios where the transaction hash may not be available.
88-88
: Change approved:encodedTx
property added.This addition enhances the functionality by providing encoded transaction data, which can be useful for off-chain handling.
packages/core-sdk/src/types/resources/license.ts (4)
44-44
: Change approved:encodedTx
property added.This addition enhances the functionality by providing encoded transaction data, which can be useful for off-chain handling.
68-68
: Change approved:txHash
property made optional.This change allows for flexibility in scenarios where the transaction hash may not be available.
69-69
: Change approved:encodedTx
property added.This addition enhances the functionality by providing encoded transaction data, which can be useful for off-chain handling.
85-85
: Change approved:encodedTx
property added.This addition enhances the functionality by providing encoded transaction data, which can be useful for off-chain handling.
packages/core-sdk/src/types/resources/ipAsset.ts (6)
17-18
: LGTM!The addition of the
encodedTx
property enhances the flexibility of the response type.
35-36
: LGTM!The addition of the
encodedTx
property and makingtxHash
optional enhances the flexibility of the response type.
49-50
: LGTM!The addition of the
encodedTx
property enhances the flexibility of the response type.
64-65
: LGTM!The addition of the
encodedTx
property and makingtxHash
optional enhances the flexibility of the response type.
84-85
: LGTM!The addition of the
encodedTx
property and makingtxHash
optional enhances the flexibility of the response type.
101-102
: LGTM!The addition of the
encodedTx
property and makingtxHash
optional enhances the flexibility of the response type.packages/wagmi-generator/sdk.ts (3)
479-480
: LGTM!The addition of the
MethodEncode
type enhances the clarity and type safety of the encoding methods.
242-280
: LGTM!The
generateContractDataFunction
function is well-structured and enhances the SDK's capability to handle encoding for contract function calls.
457-460
: LGTM!The changes to the
generateContract
function integrate the new encoding functionality effectively.packages/core-sdk/src/abi/generated.ts (27)
7413-7413
: LGTM!The type
MethodEncode
is well-defined, ensuring type safety and consistency.
7580-7595
: LGTM!The method
setAllPermissionsEncode
correctly encodes the parameters for thesetAllPermissions
function.
7616-7633
: LGTM!The method
setBatchPermissionsEncode
correctly encodes the parameters for thesetBatchPermissions
function.
7653-7669
: LGTM!The method
setPermissionEncode
correctly encodes the parameters for thesetPermission
function.
8036-8051
: LGTM!The method
freezeMetadataEncode
correctly encodes the parameters for thefreezeMetadata
function.
8070-8085
: LGTM!The method
setAllEncode
correctly encodes the parameters for thesetAll
function.
8106-8121
: LGTM!The method
setMetadataUriEncode
correctly encodes the parameters for thesetMetadataURI
function.
8142-8159
: LGTM!The method
updateNftTokenUriEncode
correctly encodes the parameters for theupdateNftTokenURI
function.
8408-8423
: LGTM!The method
cancelDisputeEncode
correctly encodes the parameters for thecancelDispute
function.
8444-8459
: LGTM!The method
raiseDisputeEncode
correctly encodes the parameters for theraiseDispute
function.
8480-8495
: LGTM!The method
resolveDisputeEncode
correctly encodes the parameters for theresolveDispute
function.
8589-8604
: LGTM!The method
executeEncode
correctly encodes the parameters for theexecute
function.
8632-8654
: LGTM!The method
executeWithSigEncode
correctly encodes the parameters for theexecuteWithSig
function.
8899-8915
: LGTM!The method
registerEncode
correctly encodes the parameters for theregister
function.
9211-9228
: LGTM!The method
claimRevenueBySnapshotBatchEncode
correctly encodes the parameters for theclaimRevenueBySnapshotBatch
function.
9249-9266
: LGTM!The method
claimRevenueByTokenBatchEncode
correctly encodes the parameters for theclaimRevenueByTokenBatch
function.
9287-9304
: LGTM!The method
collectRoyaltyTokensEncode
correctly encodes the parameters for thecollectRoyaltyTokens
function.
9322-9336
: LGTM!The method
snapshotEncode
correctly encodes the parameters for thesnapshot
function.
10539-10556
: LGTM!The method
attachLicenseTermsToIpEncode
correctly encodes the parameters for theattachLicenseTermsToIp
function.
10577-10592
: LGTM!The method
initializeEncode
correctly encodes the parameters for theinitialize
function.
10618-10640
: LGTM!The method
registerDerivativeIpEncode
correctly encodes the parameters for theregisterDerivativeIp
function.
10661-10678
: LGTM!The method
registerLicenseTemplateEncode
correctly encodes the parameters for theregisterLicenseTemplate
function.
10699-10714
: LGTM!The method
setAuthorityEncode
correctly encodes the parameters for thesetAuthority
function.
10735-10752
: LGTM!The method
setDefaultLicenseTermsEncode
correctly encodes the parameters for thesetDefaultLicenseTerms
function.
10773-10788
: LGTM!The method
setExpireTimeEncode
correctly encodes the parameters for thesetExpireTime
function.
10809-10826
: LGTM!The method
setLicensingConfigForIpEncode
correctly encodes the parameters for thesetLicensingConfigForIp
function.
10852-10874
: LGTM!The method
setLicensingConfigForLicenseEncode
correctly encodes the parameters for the `setLicensingConfigForLicense
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Outside diff range, codebase verification and nitpick comments (1)
packages/core-sdk/src/resources/dispute.ts (1)
115-129
: Issue Found: Handling ofencodedTxDataOnly
OptionThe
encodedTxDataOnly
option introduced in theresolveDispute
function indispute.ts
is not handled in other parts of the codebase whereresolveDispute
is called. This could lead to potential issues if theencodedTxDataOnly
option is used but not properly handled.
- Files to Review:
packages/react-sdk/src/resources/useDispute.ts
packages/core-sdk/src/abi/generated.ts
Please ensure that all calls to
resolveDispute
handle theencodedTxDataOnly
option correctly.Analysis chain
LGTM! But verify the function usage in the codebase.
The code changes are approved.
However, ensure that all function calls to
resolveDispute
match the new structure and handle theencodedTxDataOnly
option correctly.
Let's correct the file type and re-run the search to verify the function usage in the codebase.
Let's correct the file type to
ts
and re-run the search to verify the function usage in the codebase.
Let's extract and review the relevant code snippets from the identified files to ensure they handle the
encodedTxDataOnly
option correctly.
Let's extract the full implementation of the
resolveDispute
function fromuseDispute.ts
andgenerated.ts
to verify the handling of theencodedTxDataOnly
option.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all function calls to `resolveDispute` match the new structure. # Test: Search for the function usage. Expect: Only occurrences of the new structure. rg --type python -A 5 $'resolveDispute'Length of output: 69
Script:
#!/bin/bash # Description: Verify all function calls to `resolveDispute` match the new structure. # Test: Search for the function usage. Expect: Only occurrences of the new structure. rg --type typescript -A 5 'resolveDispute'Length of output: 77
Script:
#!/bin/bash # Description: Verify all function calls to `resolveDispute` match the new structure. # Test: Search for the function usage. Expect: Only occurrences of the new structure. rg --type ts -A 5 'resolveDispute'Length of output: 9488
Script:
#!/bin/bash # Extract relevant code snippets to verify handling of `encodedTxDataOnly` option. # Extract snippets from `dispute.test.ts` rg --type ts -A 10 -B 5 'resolveDispute' packages/core-sdk/test/unit/resources/dispute.test.ts # Extract snippets from `useDispute.ts` rg --type ts -A 10 -B 5 'resolveDispute' packages/react-sdk/src/resources/useDispute.ts # Extract snippets from `generated.ts` rg --type ts -A 10 -B 5 'resolveDispute' packages/core-sdk/src/abi/generated.tsLength of output: 5269
Script:
#!/bin/bash # Extract the full implementation of the `resolveDispute` function to verify handling of `encodedTxDataOnly` option. # Extract full implementation from `useDispute.ts` rg --type ts -A 50 'resolveDispute' packages/react-sdk/src/resources/useDispute.ts # Extract full implementation from `generated.ts` rg --type ts -A 50 'resolveDispute' packages/core-sdk/src/abi/generated.tsLength of output: 7442
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (16)
- packages/core-sdk/src/index.ts (1 hunks)
- packages/core-sdk/src/resources/dispute.ts (3 hunks)
- packages/core-sdk/src/resources/ipAccount.ts (2 hunks)
- packages/core-sdk/src/resources/ipAsset.ts (6 hunks)
- packages/core-sdk/src/resources/license.ts (6 hunks)
- packages/core-sdk/src/resources/nftClient.ts (2 hunks)
- packages/core-sdk/src/resources/permission.ts (5 hunks)
- packages/core-sdk/src/resources/royalty.ts (4 hunks)
- packages/core-sdk/src/types/options.ts (1 hunks)
- packages/core-sdk/src/types/resources/dispute.ts (4 hunks)
- packages/core-sdk/src/types/resources/ipAccount.ts (3 hunks)
- packages/core-sdk/src/types/resources/ipAsset.ts (7 hunks)
- packages/core-sdk/src/types/resources/license.ts (4 hunks)
- packages/core-sdk/src/types/resources/nftClient.ts (2 hunks)
- packages/core-sdk/src/types/resources/permission.ts (2 hunks)
- packages/core-sdk/src/types/resources/royalty.ts (4 hunks)
Files skipped from review as they are similar to previous changes (7)
- packages/core-sdk/src/types/resources/dispute.ts
- packages/core-sdk/src/types/resources/ipAccount.ts
- packages/core-sdk/src/types/resources/ipAsset.ts
- packages/core-sdk/src/types/resources/license.ts
- packages/core-sdk/src/types/resources/nftClient.ts
- packages/core-sdk/src/types/resources/permission.ts
- packages/core-sdk/src/types/resources/royalty.ts
Additional comments not posted (27)
packages/core-sdk/src/types/options.ts (1)
6-9
: Consider renamingencodedTxDataOnly
toencodedTxDataOnly
.The existing comment suggests renaming this property for clarity. The current name is already appropriate and descriptive, but if there's a consensus on the suggested name, it can be updated.
packages/core-sdk/src/index.ts (1)
88-88
: LGTM!The new export
MethodEncode
enhances the module's type definitions without affecting existing functionality.packages/core-sdk/src/resources/nftClient.ts (3)
Line range hint
46-55
:
Good practice: Consolidate parameters into a request object.The introduction of the
req
object enhances code readability and maintainability by grouping related properties together.
57-59
: Enhancement: Add support forencodedTxDataOnly
option.The new conditional branch allows for more flexible handling of transaction options, enabling the caller to choose between receiving encoded transaction data or executing the transaction directly.
60-70
: Maintain existing functionality while adding new features.The original logic for awaiting a transaction receipt and parsing logs is preserved within the new conditional structure, ensuring backward compatibility.
packages/core-sdk/src/resources/ipAccount.ts (2)
43-57
: LGTM! But verify the function usage in the codebase.The code changes are approved.
However, ensure that all function calls to
execute
match the new structure and handle theencodedTxDataOnly
option correctly.Verification successful
LGTM! The function usage matches the new structure and handles the
encodedTxDataOnly
option correctly.The code changes are verified and correctly implemented:
packages/core-sdk/src/resources/ipAccount.ts
packages/core-sdk/test/integration/royalty.test.ts
packages/react-sdk/test/integration/useRoyalty.test.ts
packages/core-sdk/test/integration/ipAccount.test.ts
packages/react-sdk/test/integration/useIpAccount.test.ts
packages/core-sdk/src/resources/permission.ts
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all function calls to `execute` match the new structure. # Test: Search for the function usage. Expect: Only occurrences of the new structure. rg --type python -A 5 $'execute'Length of output: 62
Script:
#!/bin/bash # Description: Verify all function calls to `execute` match the new structure. # Test: Search for the function usage. Expect: Only occurrences of the new structure. rg --type ts -A 5 $'execute'Length of output: 34006
Script:
#!/bin/bash # Description: Extract detailed context around the `execute` function calls to verify the handling of the `encodedTxDataOnly` option. # Test: Search for the function usage and include more context lines. Expect: Proper handling of the `encodedTxDataOnly` option. rg --type ts -A 10 -B 10 $'execute'Length of output: 69419
85-102
: LGTM! But verify the function usage in the codebase.The code changes are approved.
However, ensure that all function calls to
executeWithSig
match the new structure and handle theencodedTxDataOnly
option correctly.packages/core-sdk/src/resources/dispute.ts (2)
42-62
: LGTM! But verify the function usage in the codebase.The code changes are approved.
However, ensure that all function calls to
raiseDispute
match the new structure and handle theencodedTxDataOnly
option correctly.
83-97
: LGTM! But verify the function usage in the codebase.The code changes are approved.
However, ensure that all function calls to
cancelDispute
match the new structure and handle theencodedTxDataOnly
option correctly.Verification successful
Function
cancelDispute
usage verification:The search results indicate that the
cancelDispute
function is used across various files, including integration tests, unit tests, and resource files. The instances reviewed show that the new structure and theencodedTxDataOnly
option are correctly handled.
Integration Tests:
packages/react-sdk/test/integration/useDispute.test.ts
packages/core-sdk/test/integration/dispute.test.ts
Unit Tests:
packages/core-sdk/test/unit/resources/dispute.test.ts
Resource Files:
packages/react-sdk/src/resources/useDispute.ts
packages/core-sdk/src/resources/dispute.ts
All instances follow the new structure and handle the
encodedTxDataOnly
option appropriately.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all function calls to `cancelDispute` match the new structure. # Test: Search for the function usage. Expect: Only occurrences of the new structure. rg --type python -A 5 $'cancelDispute'Length of output: 68
Script:
#!/bin/bash # Description: Verify all function calls to `cancelDispute` match the new structure. # Test: Search for the function usage in TypeScript files. Expect: Only occurrences of the new structure. rg --type typescript -A 5 $'cancelDispute'Length of output: 76
Script:
#!/bin/bash # Description: Verify all function calls to `cancelDispute` match the new structure. # Test: Search for the function usage in TypeScript and JavaScript files. Expect: Only occurrences of the new structure. rg --type ts -A 5 $'cancelDispute' rg --type js -A 5 $'cancelDispute'Length of output: 11463
packages/core-sdk/src/resources/royalty.ts (4)
120-135
: LGTM! But verify the function usage in the codebase.The code changes are approved.
However, ensure that all function calls to
payRoyaltyOnBehalf
match the new structure and handle theencodedTxDataOnly
option correctly.
202-222
: LGTM! But verify the function usage in the codebase.The code changes are approved.
However, ensure that all function calls to
claimRevenue
match the new structure and handle theencodedTxDataOnly
option correctly.
71-87
: LGTM! But verify the function usage in the codebase.The code changes are approved.
However, ensure that all function calls to
collectRoyaltyTokens
match the new structure and handle theencodedTxDataOnly
option correctly.Verification successful
Let's correct the file type and re-run the search to verify the function usage in the codebase.
Let's correct the file type to
ts
and re-run the search to verify the function usage in the codebase.
Function usage verified and matches the new structure.
The function
collectRoyaltyTokens
is used correctly in the codebase, with the new structure and options being accounted for. The presence of tests further supports the correctness of the implementation.
packages/react-sdk/test/integration/useRoyalty.test.ts
packages/core-sdk/test/unit/resources/royalty.test.ts
packages/react-sdk/src/resources/useRoyalty.ts
packages/core-sdk/src/abi/generated.ts
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all function calls to `collectRoyaltyTokens` match the new structure. # Test: Search for the function usage. Expect: Only occurrences of the new structure. rg --type python -A 5 $'collectRoyaltyTokens'Length of output: 75
Script:
#!/bin/bash # Description: Verify all function calls to `collectRoyaltyTokens` match the new structure. # Test: Search for the function usage. Expect: Only occurrences of the new structure. rg --type typescript -A 5 $'collectRoyaltyTokens'Length of output: 83
Script:
#!/bin/bash # Description: Verify all function calls to `collectRoyaltyTokens` match the new structure. # Test: Search for the function usage. Expect: Only occurrences of the new structure. rg --type ts -A 5 $'collectRoyaltyTokens'Length of output: 16866
255-265
: LGTM! But verify the function usage in the codebase.The code changes are approved.
However, ensure that all function calls to
snapshot
match the new structure and handle theencodedTxDataOnly
option correctly.packages/core-sdk/src/resources/permission.ts (5)
141-159
: LGTM! But verify the function usage in the codebase.The code changes are approved.
However, ensure that all function calls to
createSetPermissionSignature
match the new request object structure.Verification successful
Verification successful!
All instances of the
createSetPermissionSignature
function calls in the codebase match the new request object structure.
- Found in test files and implementation files, all using the new format.
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all function calls to `createSetPermissionSignature` match the new request object structure. # Test: Search for the function usage. Expect: Only occurrences of the new request object structure. rg --type python -A 5 $'createSetPermissionSignature'Length of output: 83
Script:
#!/bin/bash # Description: Verify all function calls to `createSetPermissionSignature` match the new request object structure. # Test: Search for the function usage. Expect: Only occurrences of the new request object structure. rg --type ts -A 5 'createSetPermissionSignature'Length of output: 12215
293-310
: LGTM! But verify the function usage in the codebase.The code changes are approved.
However, ensure that all function calls to
createBatchPermissionSignature
match the new request object structure.Verification successful
The previous script failed due to an incorrect file type specification. Let's correct this and search for the function usage within TypeScript files.
Verified: All function calls to
createBatchPermissionSignature
match the new request object structure.The code changes are consistently applied across the codebase.
packages/core-sdk/test/integration/permission.test.ts
packages/react-sdk/test/integration/usePermission.test.ts
packages/core-sdk/test/unit/resources/permission.test.ts
packages/react-sdk/src/resources/usePermission.ts
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all function calls to `createBatchPermissionSignature` match the new request object structure. # Test: Search for the function usage. Expect: Only occurrences of the new request object structure. rg --type python -A 5 $'createBatchPermissionSignature'Length of output: 85
Script:
#!/bin/bash # Description: Verify all function calls to `createBatchPermissionSignature` match the new request object structure. # Test: Search for the function usage. Expect: Only occurrences of the new request object structure. rg --type ts -A 5 $'createBatchPermissionSignature'Length of output: 7466
180-194
: LGTM! But verify the function usage in the codebase.The code changes are approved.
However, ensure that all function calls to
setAllPermissions
match the new request object structure.Verification successful
Function usage verified successfully.
All instances of the
setAllPermissions
function call match the new request object structure.
packages/core-sdk/test/integration/permission.test.ts
packages/react-sdk/test/integration/usePermission.test.ts
packages/core-sdk/test/unit/resources/permission.test.ts
packages/core-sdk/src/resources/permission.ts
packages/core-sdk/src/abi/generated.ts
packages/react-sdk/src/resources/usePermission.ts
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all function calls to `setAllPermissions` match the new request object structure. # Test: Search for the function usage. Expect: Only occurrences of the new request object structure. rg --type python -A 5 $'setAllPermissions'Length of output: 72
Script:
#!/bin/bash # Description: Verify all function calls to `setAllPermissions` match the new request object structure. # Test: Search for the function usage. Expect: Only occurrences of the new request object structure. rg --type typescript -A 5 $'setAllPermissions'Length of output: 80
Script:
#!/bin/bash # Description: Verify all function calls to `setAllPermissions` match the new request object structure. # Test: Search for the function usage. Expect: Only occurrences of the new request object structure. rg --type ts -A 5 $'setAllPermissions'Length of output: 12448
68-86
: LGTM! But verify the function usage in the codebase.The code changes are approved.
However, ensure that all function calls to
setPermission
match the new request object structure.Verification successful
The function calls to
setPermission
have been updated to match the new request object structure.The search results indicate that the new request object structure is being used in the following files:
packages/react-sdk/test/integration/useIpAccount.test.ts
packages/react-sdk/test/integration/usePermission.test.ts
packages/react-sdk/src/resources/usePermission.ts
packages/core-sdk/test/integration/permission.test.ts
packages/core-sdk/test/unit/resources/permission.test.ts
packages/core-sdk/src/resources/permission.ts
These updates confirm that the changes have been correctly applied across the codebase.
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all function calls to `setPermission` match the new request object structure. # Test: Search for the function usage. Expect: Only occurrences of the new request object structure. rg --type python -A 5 $'setPermission'Length of output: 68
Script:
#!/bin/bash # Description: Verify all function calls to `setPermission` match the new request object structure. # Test: Search for the function usage. Expect: Only occurrences of the new request object structure. rg --type typescript -A 5 'setPermission'Length of output: 76
Script:
#!/bin/bash # Description: Verify all function calls to `setPermission` match the new request object structure. # Test: Search for the function usage. Expect: Only occurrences of the new request object structure. rg --type ts -A 5 'setPermission'Length of output: 16518
222-240
: LGTM! But verify the function usage in the codebase.The code changes are approved.
However, ensure that all function calls to
setBatchPermissions
match the new request object structure.Verification successful
Let's re-run the verification script with the correct file type.
Let's re-run the verification script with the correct file type for TypeScript files.
LGTM! The function calls to
setBatchPermissions
match the new request object structure.The code changes are approved.
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all function calls to `setBatchPermissions` match the new request object structure. # Test: Search for the function usage. Expect: Only occurrences of the new request object structure. rg --type python -A 5 $'setBatchPermissions'Length of output: 74
Script:
#!/bin/bash # Description: Verify all function calls to `setBatchPermissions` match the new request object structure. # Test: Search for the function usage in TypeScript files. Expect: Only occurrences of the new request object structure. rg --type typescript -A 5 'setBatchPermissions'Length of output: 82
Script:
#!/bin/bash # Description: Verify all function calls to `setBatchPermissions` match the new request object structure. # Test: Search for the function usage in TypeScript files. Expect: Only occurrences of the new request object structure. rg --type ts -A 5 'setBatchPermissions'Length of output: 13458
packages/core-sdk/src/resources/license.ts (5)
Line range hint
299-324
:
LGTM! But verify the function usage in the codebase.The code changes are approved.
However, ensure that all function calls to
mintLicenseTokens
match the new request object structure.Verification successful
Function usage verified
The function calls to
mintLicenseTokens
match the new request object structure across the codebase.
- Instances found in test files and implementation files show consistent usage with the new structure.
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all function calls to `mintLicenseTokens` match the new request object structure. # Test: Search for the function usage. Expect: Only occurrences of the new request object structure. rg --type python -A 5 $'mintLicenseTokens'Length of output: 72
Script:
#!/bin/bash # Description: Verify all function calls to `mintLicenseTokens` match the new request object structure. # Test: Search for the function usage. Expect: Only occurrences of the new request object structure. rg --type typescript -A 5 'mintLicenseTokens'Length of output: 80
Script:
#!/bin/bash # Description: Verify all function calls to `mintLicenseTokens` match the new request object structure. # Test: Search for the function usage. Expect: Only occurrences of the new request object structure. rg --type ts -A 5 'mintLicenseTokens'Length of output: 21774
115-132
: LGTM! But verify the function usage in the codebase.The code changes are approved.
However, ensure that all function calls to
registerCommercialUsePIL
match the new request object structure.Verification successful
Function calls to
registerCommercialUsePIL
match the new request object structure.The code changes are verified and approved.
- Instances found in
packages/react-sdk/test/integration/useLicense.test.ts
- Instances found in
packages/react-sdk/test/integration/useRoyalty.test.ts
- Instances found in
packages/core-sdk/test/integration/license.test.ts
- Instances found in
packages/core-sdk/test/unit/resources/license.test.ts
- Instances found in
packages/react-sdk/src/resources/useLicense.ts
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all function calls to `registerCommercialUsePIL` match the new request object structure. # Test: Search for the function usage. Expect: Only occurrences of the new request object structure. rg --type python -A 5 $'registerCommercialUsePIL'Length of output: 79
Script:
#!/bin/bash # Description: Verify all function calls to `registerCommercialUsePIL` match the new request object structure. # Test: Search for the function usage. Expect: Only occurrences of the new request object structure. rg --type typescript -A 5 'registerCommercialUsePIL'Length of output: 87
Script:
#!/bin/bash # Description: Verify all function calls to `registerCommercialUsePIL` match the new request object structure. # Test: Search for the function usage. Expect: Only occurrences of the new request object structure. rg -A 5 'registerCommercialUsePIL'Length of output: 9979
162-179
: LGTM! But verify the function usage in the codebase.The code changes are approved.
However, ensure that all function calls to
registerCommercialRemixPIL
match the new request object structure.Verification successful
Verified: All function calls to
registerCommercialRemixPIL
match the new request object structure.
- Instances in
packages/react-sdk/src/resources/useLicense.ts
and various test files confirm the correct usage of thetxOptions
field.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all function calls to `registerCommercialRemixPIL` match the new request object structure. # Test: Search for the function usage. Expect: Only occurrences of the new request object structure. rg --type python -A 5 $'registerCommercialRemixPIL'Length of output: 81
Script:
#!/bin/bash # Description: Verify all function calls to `registerCommercialRemixPIL` match the new request object structure. # Test: Search for the function usage. Expect: Only occurrences of the new request object structure. rg --type typescript -A 5 'registerCommercialRemixPIL'Length of output: 89
Script:
#!/bin/bash # Description: Verify all function calls to `registerCommercialRemixPIL` match the new request object structure. # Test: Search for the function usage. Expect: Only occurrences of the new request object structure. rg --glob '*.ts' -A 5 'registerCommercialRemixPIL'Length of output: 10046
224-238
: LGTM! But verify the function usage in the codebase.The code changes are approved.
However, ensure that all function calls to
attachLicenseTerms
match the new request object structure.
70-87
: LGTM! But verify the function usage in the codebase.The code changes are approved.
However, ensure that all function calls to
registerNonComSocialRemixingPIL
match the new request object structure.Verification successful
Verified: All function calls to
registerNonComSocialRemixingPIL
match the new request object structure.
packages/react-sdk/test/integration/useLicense.test.ts
packages/react-sdk/test/integration/useIpAsset.test.ts
packages/core-sdk/test/unit/resources/license.test.ts
packages/core-sdk/test/integration/license.test.ts
packages/react-sdk/src/resources/useLicense.ts
packages/core-sdk/test/integration/ipAsset.test.ts
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all function calls to `registerNonComSocialRemixingPIL` match the new request object structure. # Test: Search for the function usage. Expect: Only occurrences of the new request object structure. rg --type python -A 5 $'registerNonComSocialRemixingPIL'Length of output: 86
Script:
#!/bin/bash # Description: Verify all function calls to `registerNonComSocialRemixingPIL` match the new request object structure. # Test: Search for the function usage. Expect: Only occurrences of the new request object structure. rg --type typescript -A 5 $'registerNonComSocialRemixingPIL'Length of output: 94
Script:
#!/bin/bash # Description: Verify all function calls to `registerNonComSocialRemixingPIL` match the new request object structure. # Test: Search for the function usage. Expect: Only occurrences of the new request object structure. ast-grep --lang typescript --pattern 'registerNonComSocialRemixingPIL($_$)'Length of output: 77
Script:
#!/bin/bash # Description: Verify all function calls to `registerNonComSocialRemixingPIL` match the new request object structure. # Test: Search for the function usage. Expect: Only occurrences of the new request object structure. rg 'registerNonComSocialRemixingPIL' -A 5Length of output: 12005
packages/core-sdk/src/resources/ipAsset.ts (4)
354-371
: LGTM! But verify the function usage in the codebase.The code changes are approved.
However, ensure that all function calls to
mintAndRegisterIpAssetWithPilTerms
match the new request object structure.
224-240
: LGTM! But verify the function usage in the codebase.The code changes are approved.
However, ensure that all function calls to
registerDerivative
match the new request object structure.
275-291
: LGTM! But verify the function usage in the codebase.The code changes are approved.
However, ensure that all function calls to
registerDerivativeWithLicenseTokens
match the new request object structure.Verification successful
Verification successful! All occurrences of
registerDerivativeWithLicenseTokens
match the new request object structure.
packages/core-sdk/test/unit/resources/ipAsset.test.ts
packages/core-sdk/test/integration/ipAsset.test.ts
packages/react-sdk/test/integration/useIpAsset.test.ts
packages/react-sdk/src/resources/useIpAsset.ts
packages/core-sdk/src/resources/ipAsset.ts
packages/core-sdk/src/abi/generated.ts
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all function calls to `registerDerivativeWithLicenseTokens` match the new request object structure. # Test: Search for the function usage. Expect: Only occurrences of the new request object structure. rg --type python -A 5 $'registerDerivativeWithLicenseTokens'Length of output: 90
Script:
#!/bin/bash # Description: Verify all function calls to `registerDerivativeWithLicenseTokens` match the new request object structure. # Test: Search for the function usage. Expect: Only occurrences of the new request object structure. rg --type typescript -A 5 $'registerDerivativeWithLicenseTokens'Length of output: 98
Script:
#!/bin/bash # Description: Verify all function calls to `registerDerivativeWithLicenseTokens` match the new request object structure. # Test: Search for the function usage. Expect: Only occurrences of the new request object structure. rg --type ts -A 5 $'registerDerivativeWithLicenseTokens'Length of output: 15288
139-168
: LGTM! But verify the function usage in the codebase.The code changes are approved.
However, ensure that all function calls to
register
match the new request object structure.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (11)
- package.json (1 hunks)
- packages/core-sdk/src/abi/generated.ts (71 hunks)
- packages/core-sdk/src/index.ts (1 hunks)
- packages/core-sdk/src/types/resources/dispute.ts (4 hunks)
- packages/core-sdk/src/types/resources/ipAccount.ts (3 hunks)
- packages/core-sdk/src/types/resources/ipAsset.ts (7 hunks)
- packages/core-sdk/src/types/resources/license.ts (4 hunks)
- packages/core-sdk/src/types/resources/nftClient.ts (2 hunks)
- packages/core-sdk/src/types/resources/permission.ts (2 hunks)
- packages/core-sdk/src/types/resources/royalty.ts (4 hunks)
- packages/wagmi-generator/sdk.ts (3 hunks)
Files skipped from review due to trivial changes (2)
- package.json
- packages/core-sdk/src/index.ts
Files skipped from review as they are similar to previous changes (7)
- packages/core-sdk/src/types/resources/dispute.ts
- packages/core-sdk/src/types/resources/ipAccount.ts
- packages/core-sdk/src/types/resources/ipAsset.ts
- packages/core-sdk/src/types/resources/license.ts
- packages/core-sdk/src/types/resources/nftClient.ts
- packages/core-sdk/src/types/resources/permission.ts
- packages/core-sdk/src/types/resources/royalty.ts
Additional comments not posted (31)
packages/wagmi-generator/sdk.ts (4)
458-460
: Ensure proper integration ofgenerateContractDataFunction
.The integration of
generateContractDataFunction
withingenerateContract
appears correct. Ensure that this function is invoked correctly for each contract function.Verification successful
Proper integration of
generateContractDataFunction
confirmed.The
generateContractDataFunction
is correctly invoked within thegenerateContract
function, and its results are appropriately utilized.
- Location:
packages/wagmi-generator/sdk.ts
lines 458-460Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the integration of `generateContractDataFunction` within `generateContract`. # Test: Search for the invocation of `generateContractDataFunction`. Expect: Correct integration. rg --type python -A 5 $'generateContractDataFunction'Length of output: 83
Script:
#!/bin/bash # Description: Verify the integration of `generateContractDataFunction` within `generateContract`. # Test: Search for the invocation of `generateContractDataFunction`. Expect: Correct integration. rg --type typescript -A 5 'generateContractDataFunction'Length of output: 91
Script:
#!/bin/bash # Description: Verify the integration of `generateContractDataFunction` within `generateContract`. # Test: Search for the invocation of `generateContractDataFunction`. Expect: Correct integration. rg --type ts -A 5 'generateContractDataFunction'Length of output: 1055
242-245
: Ensure consistent naming conventions.The variable
indexFuncName
is constructed based on the presence of anindex
property infunc
. Ensure that this is consistently applied across the codebase.Verification successful
Consistent naming conventions verified.
The variable
indexFuncName
is consistently used across the codebase, adhering to the intended naming conventions.
packages/wagmi-generator/sdk.ts
: Consistent usage ofindexFuncName
confirmed.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the consistent usage of `indexFuncName` across the codebase. # Test: Search for the usage of `indexFuncName`. Expect: Consistent application. rg --type python -A 5 $'indexFuncName'Length of output: 68
Script:
#!/bin/bash # Description: Verify the consistent usage of `indexFuncName` across the codebase. # Test: Search for the usage of `indexFuncName`. Expect: Consistent application. rg --type typescript -A 5 'indexFuncName'Length of output: 76
Script:
#!/bin/bash # Description: Verify the consistent usage of `indexFuncName` across the codebase. # Test: Search for the usage of `indexFuncName`. Expect: Consistent application. rg --type ts -A 5 'indexFuncName'Length of output: 2997
479-479
: Ensure type safety forEncodedTxData
.The type
EncodedTxData
is well-defined. Ensure that it is used consistently across the codebase.Verification successful
The type
EncodedTxData
is used consistently across the codebase.The type
EncodedTxData
is well-defined and its usage is consistent throughout the codebase.
packages/wagmi-generator/sdk.ts
packages/core-sdk/src/index.ts
packages/core-sdk/src/types/resources/permission.ts
packages/core-sdk/src/types/resources/royalty.ts
packages/core-sdk/src/types/resources/ipAsset.ts
packages/core-sdk/src/types/resources/license.ts
packages/core-sdk/src/types/resources/dispute.ts
packages/core-sdk/src/types/resources/nftClient.ts
packages/core-sdk/src/types/resources/ipAccount.ts
packages/core-sdk/src/abi/generated.ts
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the usage of `EncodedTxData` in the codebase. # Test: Search for the usage of `EncodedTxData`. Expect: Consistent application. rg --type python -A 5 $'EncodedTxData'Length of output: 68
Script:
#!/bin/bash # Description: Verify the usage of `EncodedTxData` in the codebase. # Test: Search for the usage of `EncodedTxData`. Expect: Consistent application. rg --type ts -A 5 $'EncodedTxData'Length of output: 54565
255-255
: ImportencodeFunctionData
fromviem
.Ensure that the
encodeFunctionData
import fromviem
is necessary and used correctly.Verification successful
Import
encodeFunctionData
fromviem
is necessary and used correctly.The
encodeFunctionData
function is used in multiple files across the codebase, including the file under review (packages/wagmi-generator/sdk.ts
). The import is justified and correctly implemented.
packages/wagmi-generator/sdk.ts
packages/react-sdk/test/integration/useRoyalty.test.ts
packages/react-sdk/test/integration/useIpAccount.test.ts
packages/core-sdk/test/integration/royalty.test.ts
packages/core-sdk/src/resources/permission.ts
packages/core-sdk/src/resources/royalty.ts
packages/core-sdk/src/utils/sign.ts
packages/core-sdk/test/integration/ipAccount.test.ts
packages/core-sdk/src/abi/generated.ts
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the usage of `encodeFunctionData` in the codebase. # Test: Search for the usage of `encodeFunctionData`. Expect: Correct usage. rg --type python -A 5 $'encodeFunctionData'Length of output: 73
Script:
#!/bin/bash # Description: Verify the usage of `encodeFunctionData` in the codebase. # Test: Search for the usage of `encodeFunctionData`. Expect: Correct usage. rg --type js -A 5 'encodeFunctionData'Length of output: 38
Script:
#!/bin/bash # Description: Verify the usage of `encodeFunctionData` in the codebase. # Test: Search for the usage of `encodeFunctionData` across all file types. Expect: Correct usage or no usage. rg -A 5 'encodeFunctionData'Length of output: 37624
packages/core-sdk/src/abi/generated.ts (27)
1-3
: Imports look good.The imports from the
viem
library are necessary for the subsequent code.
11-15
: Imports look good.The imports from the
viem
library are necessary for the subsequent code.
7413-7414
: Type definition looks good.The
EncodedTxData
type is clearly defined and aligns with the purpose of encoding transaction data.
7580-7595
: Method implementation looks good.The
setAllPermissionsEncode
method correctly encodes the parameters for thesetAllPermissions
function of theAccessController
contract.
7616-7633
: Method implementation looks good.The
setBatchPermissionsEncode
method correctly encodes the parameters for thesetBatchPermissions
function of theAccessController
contract.
7653-7669
: Method implementation looks good.The
setPermissionEncode
method correctly encodes the parameters for thesetPermission
function of theAccessController
contract.
8036-8051
: Method implementation looks good.The
freezeMetadataEncode
method correctly encodes the parameters for thefreezeMetadata
function of theCoreMetadataModule
contract.
8070-8085
: Method implementation looks good.The
setAllEncode
method correctly encodes the parameters for thesetAll
function of theCoreMetadataModule
contract.
8106-8121
: Method implementation looks good.The
setMetadataUriEncode
method correctly encodes the parameters for thesetMetadataURI
function of theCoreMetadataModule
contract.
8142-8159
: Method implementation looks good.The
updateNftTokenUriEncode
method correctly encodes the parameters for theupdateNftTokenURI
function of theCoreMetadataModule
contract.
8408-8423
: Method implementation looks good.The
cancelDisputeEncode
method correctly encodes the parameters for thecancelDispute
function of theDisputeModule
contract.
8444-8459
: Method implementation looks good.The
raiseDisputeEncode
method correctly encodes the parameters for theraiseDispute
function of theDisputeModule
contract.
8480-8495
: Method implementation looks good.The
resolveDisputeEncode
method correctly encodes the parameters for theresolveDispute
function of theDisputeModule
contract.
8589-8604
: Method implementation looks good.The
executeEncode
method correctly encodes the parameters for theexecute
function of theIpAccountImpl
contract.
8631-8654
: Method implementation looks good.The
executeWithSigEncode
method correctly encodes the parameters for theexecuteWithSig
function of theIpAccountImpl
contract.
8899-8915
: Method implementation looks good.The
registerEncode
method correctly encodes the parameters for theregister
function of theIpAssetRegistry
contract.
9211-9228
: Method implementation looks good.The
claimRevenueBySnapshotBatchEncode
method correctly encodes the parameters for theclaimRevenueBySnapshotBatch
function of theIpRoyaltyVaultImpl
contract.
9249-9266
: Method implementation looks good.The
claimRevenueByTokenBatchEncode
method correctly encodes the parameters for theclaimRevenueByTokenBatch
function of theIpRoyaltyVaultImpl
contract.
9287-9304
: Method implementation looks good.The
collectRoyaltyTokensEncode
method correctly encodes the parameters for thecollectRoyaltyTokens
function of theIpRoyaltyVaultImpl
contract.
9322-9336
: Method implementation looks good.The
snapshotEncode
method correctly encodes the parameters for thesnapshot
function of theIpRoyaltyVaultImpl
contract.
10539-10556
: Method implementation looks good.The
attachLicenseTermsToIpEncode
method correctly encodes the parameters for theattachLicenseTermsToIp
function of theLicenseRegistry
contract.
10577-10592
: Method implementation looks good.The
initializeEncode
method correctly encodes the parameters for theinitialize
function of theLicenseRegistry
contract.
10618-10640
: Method implementation looks good.The
registerDerivativeIpEncode
method correctly encodes the parameters for theregisterDerivativeIp
function of theLicenseRegistry
contract.
10661-10678
: Method implementation looks good.The
registerLicenseTemplateEncode
method correctly encodes the parameters for theregisterLicenseTemplate
function of theLicenseRegistry
contract.
10699-10714
: Method implementation looks good.The
setAuthorityEncode
method correctly encodes the parameters for thesetAuthority
function of theLicenseRegistry
contract.
10735-10752
: Method implementation looks good.The
setDefaultLicenseTermsEncode
method correctly encodes the parameters for thesetDefaultLicenseTerms
function of theLicenseRegistry
contract.
10773-10788
: Method implementation looks good.The
setExpireTimeEncode
method correctly encodes the parameters for thesetExpireTime
function of theLicenseRegistry
contract.
funcLine.push(``) | ||
funcLine.push(`/**`) | ||
funcLine.push(` * method ${func.name} for contract ${contractName} with only encode`) | ||
funcLine.push(` *`) | ||
funcLine.push(` * @param request ${inName}`) | ||
funcLine.push(` * @return EncodedTxData`) | ||
funcLine.push(`*/`) | ||
funcLine.push(` public ${camelCase(indexFuncName)}Encode(${inParams}): EncodedTxData {`) | ||
funcLine.push(` return {`) | ||
funcLine.push(` to: this.address,`) | ||
funcLine.push(` data:encodeFunctionData({`) | ||
funcLine.push(` abi: ${abiName},`) | ||
funcLine.push(` functionName: "${func.name}",`) | ||
if (inType.valid) { | ||
funcLine.push(` args: [`) | ||
funcLine.push(inType.args) | ||
funcLine.push(` ],`) | ||
} | ||
funcLine.push(` }),`) | ||
funcLine.push(` };`) | ||
funcLine.push(` }`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add error handling for encoding function data.
Consider adding error handling for the encodeFunctionData
method to ensure robustness.
+ try {
return {
to: this.address,
data: encodeFunctionData({
abi: ${abiName},
functionName: "${func.name}",
args: [
${inType.args}
],
}),
};
+ } catch (error) {
+ console.error("Error encoding function data:", error);
+ throw new Error("Failed to encode function data");
+ }
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
funcLine.push(``) | |
funcLine.push(`/**`) | |
funcLine.push(` * method ${func.name} for contract ${contractName} with only encode`) | |
funcLine.push(` *`) | |
funcLine.push(` * @param request ${inName}`) | |
funcLine.push(` * @return EncodedTxData`) | |
funcLine.push(`*/`) | |
funcLine.push(` public ${camelCase(indexFuncName)}Encode(${inParams}): EncodedTxData {`) | |
funcLine.push(` return {`) | |
funcLine.push(` to: this.address,`) | |
funcLine.push(` data:encodeFunctionData({`) | |
funcLine.push(` abi: ${abiName},`) | |
funcLine.push(` functionName: "${func.name}",`) | |
if (inType.valid) { | |
funcLine.push(` args: [`) | |
funcLine.push(inType.args) | |
funcLine.push(` ],`) | |
} | |
funcLine.push(` }),`) | |
funcLine.push(` };`) | |
funcLine.push(` }`) | |
funcLine.push(``) | |
funcLine.push(`/**`) | |
funcLine.push(` * method ${func.name} for contract ${contractName} with only encode`) | |
funcLine.push(` *`) | |
funcLine.push(` * @param request ${inName}`) | |
funcLine.push(` * @return EncodedTxData`) | |
funcLine.push(`*/`) | |
funcLine.push(` public ${camelCase(indexFuncName)}Encode(${inParams}): EncodedTxData {`) | |
funcLine.push(` try {`) | |
funcLine.push(` return {`) | |
funcLine.push(` to: this.address,`) | |
funcLine.push(` data: encodeFunctionData({`) | |
funcLine.push(` abi: ${abiName},`) | |
funcLine.push(` functionName: "${func.name}",`) | |
if (inType.valid) { | |
funcLine.push(` args: [`) | |
funcLine.push(inType.args) | |
funcLine.push(` ],`) | |
} | |
funcLine.push(` }),`) | |
funcLine.push(` };`) | |
funcLine.push(` } catch (error) {`) | |
funcLine.push(` console.error("Error encoding function data:", error);`) | |
funcLine.push(` throw new Error("Failed to encode function data");`) | |
funcLine.push(` }`) | |
funcLine.push(` }`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- packages/core-sdk/test/unit/resources/ipAsset.test.ts (7 hunks)
Additional context used
Gitleaks
packages/core-sdk/test/unit/resources/ipAsset.test.ts
206-206: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.
(generic-api-key)
824-824: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.
(generic-api-key)
Additional comments not posted (6)
packages/core-sdk/test/unit/resources/ipAsset.test.ts (6)
194-227
: Test case forregister
method withencodedTxDataOnly
looks good!The test case correctly verifies that the
register
method returns encoded transaction data whenencodedTxDataOnly
is true. The use ofsinon
to stub dependencies and the assertions are appropriate.Tools
Gitleaks
206-206: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.
(generic-api-key)
386-411
: Test case forregisterDerivative
method withencodedTxDataOnly
looks good!The test case correctly verifies that the
registerDerivative
method returns encoded transaction data whenencodedTxDataOnly
is true. The use ofsinon
to stub dependencies and the assertions are appropriate.
503-526
: Test case forregisterDerivativeWithLicenseTokens
method withencodedTxDataOnly
looks good!The test case correctly verifies that the
registerDerivativeWithLicenseTokens
method returns encoded transaction data whenencodedTxDataOnly
is true. The use ofsinon
to stub dependencies and the assertions are appropriate.
613-630
: Test case forcreateIpAssetWithPilTerms
method withencodedTxDataOnly
looks good!The test case correctly verifies that the
createIpAssetWithPilTerms
method returns encoded transaction data whenencodedTxDataOnly
is true. The use ofsinon
to stub dependencies and the assertions are appropriate.
809-850
: Test case forregisterDerivativeIp
method withencodedTxDataOnly
looks good!The test case correctly verifies that the
registerDerivativeIp
method returns encoded transaction data whenencodedTxDataOnly
is true. The use ofsinon
to stub dependencies and the assertions are appropriate.Tools
Gitleaks
824-824: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.
(generic-api-key)
964-993
: Test case forregisterIpAndAttachPilTerms
method withencodedTxDataOnly
looks good!The test case correctly verifies that the
registerIpAndAttachPilTerms
method returns encoded transaction data whenencodedTxDataOnly
is true. The use ofsinon
to stub dependencies and the assertions are appropriate.
Hello @jhd2best @LuttyYang
Note that the current version is |
I approved it, but please keep in mind my previous comments for the next PR |
* add onlyEncodeTransactions support (#223) * add onlyEncodeTransactions support * opti * opti * opti * add ipasset unit test case --------- Co-authored-by: Ze <[email protected]> Co-authored-by: haodi <[email protected]> * package.json Versions Update (#226) * Top-level version updated from `0.0.4` to `0.0.3` * core-sdk version updated to `1.0.0-rc.16` --------- Co-authored-by: LuttyYang <[email protected]> Co-authored-by: Ze <[email protected]> Co-authored-by: haodi <[email protected]>
* add onlyEncodeTransactions support * opti * opti * opti * add ipasset unit test case --------- Co-authored-by: Ze <[email protected]> Co-authored-by: haodi <[email protected]>
* add onlyEncodeTransactions support * opti * opti * opti * add ipasset unit test case --------- Co-authored-by: Ze <[email protected]> Co-authored-by: haodi <[email protected]>
* add onlyEncodeTransactions support * opti * opti * opti * add ipasset unit test case --------- Co-authored-by: Ze <[email protected]> Co-authored-by: haodi <[email protected]>
* add onlyEncodeTransactions support * opti * opti * opti * add ipasset unit test case --------- Co-authored-by: Ze <[email protected]> Co-authored-by: haodi <[email protected]>
* add onlyEncodeTransactions support * opti * opti * opti * add ipasset unit test case --------- Co-authored-by: Ze <[email protected]> Co-authored-by: haodi <[email protected]>
* add onlyEncodeTransactions support (#223) * add onlyEncodeTransactions support * opti * opti * opti * add ipasset unit test case --------- Co-authored-by: Ze <[email protected]> Co-authored-by: haodi <[email protected]> * package.json Versions Update (#226) * Top-level version updated from `0.0.4` to `0.0.3` * core-sdk version updated to `1.0.0-rc.16` * Implement partner testnet (#228) * opti block explorer error (#230) * Remove no commercial license and tests * SSS * Modify state from signature with setPermission * Update wagmi/cli version * Generate contract method via partner testnet * Update implementation via partner testnet * Update unit tests * Remove sepolia chain and suport story testnet * Reset removing no commercial license * Update signature method * Update env variables * Update signature in spg * Skip react-sdk test * bump up sdk to 1.0.0-rc.17 * Approve the relate contract to permit transfer token * Update license approve method * Update signature in spg * Add approve method when call spg method * Remove API_KEY from wagmi-generate * Rename chain name * Bump up sdk to 1.0.0-rc.17 --------- Co-authored-by: LuttyYang <[email protected]> * add onlyEncodeTransactions support (#223) * add onlyEncodeTransactions support * opti * opti * opti * add ipasset unit test case --------- Co-authored-by: Ze <[email protected]> Co-authored-by: haodi <[email protected]> * package.json Versions Update (#226) * Top-level version updated from `0.0.4` to `0.0.3` * core-sdk version updated to `1.0.0-rc.16` * Remove no commercial license and tests * SSS * Modify state from signature with setPermission * Update wagmi/cli version * Generate contract method via partner testnet * Update implementation via partner testnet * Update unit tests * Remove sepolia chain and suport story testnet * Reset removing no commercial license * Update signature method * Update env variables * Update signature in spg * Skip react-sdk test * bump up sdk to 1.0.0-rc.17 * Approve the relate contract to permit transfer token * Update license approve method * Update signature in spg * Add approve method when call spg method * Remove API_KEY from wagmi-generate * Rename chain name * Bump up sdk to 1.0.0-rc.17 --------- Co-authored-by: LuttyYang <[email protected]> Co-authored-by: haodi <[email protected]> Co-authored-by: Boris Polania <[email protected]> Co-authored-by: Bonnie57 <[email protected]> Co-authored-by: Bonnie <[email protected]>
Summary by CodeRabbit
New Features
Bug Fixes
Documentation
Tests
ipAssetClient
functionality to ensure accurate handling of encoded transaction data during IP asset registration.