Skip to content

Integrate v1.3 smart contract-part one#380

Merged
bonnie57 merged 8 commits intov1.3from
bonnie/SDK-39
Jan 16, 2025
Merged

Integrate v1.3 smart contract-part one#380
bonnie57 merged 8 commits intov1.3from
bonnie/SDK-39

Conversation

@bonnie57
Copy link
Contributor

@bonnie57 bonnie57 commented Jan 8, 2025

Description

  • Integrate smart contract v1.3
  • Modified signature-related code and performed code refactoring
  • Added the following new fields: maxMintFee, maxRts, and maxRevenueShare for the related methods
  • Cleaned up and optimized royalty-related methods including snapshot and workflow methods
  • Update unit tests and integration tests

Next step:

  • Add new v1.3 methods and remove deprecated methods
  • Organise the related methods

Test

image image Attention: Confirm with the Coworker, that the dispute module is not ready in this version. So it still skipped the dispute integration tests.

Related Issue

Implement Protocol v1.3 #370

Attention

Once v1.3 is ready, merge the code into the v1.3 branch. Then, merge it into the dev branch so that it will not block other development in SDK.

@github-actions github-actions bot added the enhancement New feature or request label Jan 8, 2025
@bonnie57 bonnie57 changed the title Integrate v1.3 Integrate v1.3 smart contract Jan 8, 2025
Copy link

@SoYoung210 SoYoung210 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for v1.3, do we perhaps need a @deprecated annotation for mintAndRegisterIpAndMakeDerivativeAndDistributeRoyaltyTokens?

https://github.com/storyprotocol/protocol-periphery-v1/pull/147/files#

@bonnie57
Copy link
Contributor Author

bonnie57 commented Jan 10, 2025

for v1.3, do we perhaps need a @deprecated annotation for mintAndRegisterIpAndMakeDerivativeAndDistributeRoyaltyTokens?

https://github.com/storyprotocol/protocol-periphery-v1/pull/147/files#

Hi @SoYoung210, I confirmed this with @allenchuang. We will implement the newest code, which will not include deprecated methods. So, the next PR will import the latest methods and remove deprecated methods, and this PR will not be released in a new version. The pr is to make sure compatible v1.3 implementation.

} else {
const txHash =
await this.groupingWorkflowsClient.mintAndRegisterIpAndAttachLicenseAndAddToGroup(object);
await this.groupingWorkflowsClient.mintAndRegisterIpAndAttachLicenseAndAddToGroup2(
Copy link
Contributor

@DracoLi DracoLi Jan 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why was mintAndRegisterIpAndAttachLicenseAndAddToGroup2 created instead of mintAndRegisterIpAndAttachLicenseAndAddToGroup being updated? Do we still need the old function? I noticed a few functions are like this.

nvm I got it, looks like there are are multiple solidity functions with that name because the original one is deprecated. I guess no good ways around that until the deprecated ones are removed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, we are the same page.

},
},
// {
// name: "MockERC20",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are we planning to bring this back? we should just remove the code unless we have a reason to keep it.

Copy link
Contributor Author

@bonnie57 bonnie57 Jan 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, we need it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you add a comment here on why its commented out then? maybe a todo or something so its clear to other devs.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, added it.


const func = functions[overloadIndex || 0];

const getTypeString = (
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are we able to use viem utils to get function sig? seems viem's getFunctionSignature and getAbiItem might be useful?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, But I think it doesn't meet our requirements. The function can reduce our workload, as we don't need to manually add ABI.

@bonnie57 bonnie57 changed the base branch from dev to v1.3 January 14, 2025 09:57
@bonnie57 bonnie57 changed the title Integrate v1.3 smart contract Integrate v1.3 smart contract-part one Jan 16, 2025
@bonnie57 bonnie57 merged commit e76f3b6 into v1.3 Jan 16, 2025
16 checks passed
@bonnie57 bonnie57 deleted the bonnie/SDK-39 branch January 16, 2025 02:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants