-
Notifications
You must be signed in to change notification settings - Fork 8
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
feat: add co-build integration in code base #28
Conversation
Is this code useless? spore-contract/contracts/cluster/src/entry.rs Lines 28 to 60 in 6921c15
Never mind, maybe it could be deleted later. |
6921c15
to
1d6f158
Compare
9fe4dd6
to
74e831d
Compare
@ShookLyngs rerun CI again once |
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.
About the action.mol
, I have found a few potential issues, please check the following:
- The corresponding "melt" actions for ClusterProxy and ClusterAgent are not defined. ClusterProxy and ClusterAgent are both designed to be meltable, so maybe they should be added.
- The
code_hash
field is not defined in both theProxyCreate
and theAgentCreate
actions, but the field is defined in theMint
and theClusterCreate
actions. - The
proxy_id
field is not defined in theAgentCreate
action, but when creating a ClusterAgent, a ClusterProxy must be referenced in the transaction (via payment or cell reference).
I have some thoughts regarding the naming of the
|
in both proxy and agent contracts, there's no function to check validation of action |
Have I misunderstood why the data_hash is required in a creation action?
Do you mean the co-build feature should be disabled when melting ClusterProxy and ClusterAgent? |
I guess no, because current co-build design is rely on us, we have responsibility to design it to match our need, so the molecule I designed is to match my need that collected from contracts implementation I think if you have your sense of design from sdk, feel free to post it out, and we can discuss |
From my perspective, co-build is a feature that enables typed messages in ckb wallets. To achieve this, each type of Spore-related transaction, such as creation, transfer, and melting, should have a corresponding action defined in the molecule. Otherwise, I'm not sure what would happen if a user tries to melt a ClusterProxy, would the wallet simply request the user to sign a hash instead of a typed message?
Need more info on this, thx. |
I got your concerns, I'll add melt action for proxy and agent only with |
Cluster Proxy and Cluster Agent is planned in Stage 2. Are you going to test them right now? or just focus on Stage 1 before 2024-01-20? |
test process is the same and won't take more time, and it's better to test them all, thus we don't have to pay twice for re-deploying Cluster and Spore contracts again |
@ShookLyngs proxy/agent actions are prepared, please check it out |
Encountered some failed cases during my tests using this branch of code: sporeprotocol/spore-sdk#68. Error 11:
I've only added detailed cobuild checks to the "Transfer ClusterProxy" test case, see: https://github.com/sporeprotocol/spore-sdk/pull/68/files#diff-0d580b1ad4f9eff4775817d276fc19a0c95a2e00cc6263f94bc8c394fe44b411. Maybe you can try unpack the extra witness and see what went wrong? |
2c69ad9
to
1d7b3ab
Compare
1d7b3ab
to
5a1e62f
Compare
61b32c7
to
0e80292
Compare
Description
co-build integration for Spore contract.
Address
in Spore action definition means the intense of users if to check corresponding address, likefrom
andto
, since each Spore transaction has itsfrom
orto
address, we require co-build related contracts to check their validation of addresses.I've deleted and adjusted some duplicated and misunderstanding test cases for simplicity.
tests
has been refactored.Tasks list