Skip to content
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

chore(wallet)_: community deployment related types moved to wallet requests package #6261

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from

Conversation

saledjenic
Copy link
Contributor

@saledjenic saledjenic commented Jan 16, 2025

DeploymentParameters and DeploymentDetails types moved from communitytokens package to requests of the wallet service.

This is the first step in moving community-related transactions from communitytokens to wallet service.
Related PRs:

@status-im-auto
Copy link
Member

status-im-auto commented Jan 16, 2025

Jenkins Builds

Click to see older builds (40)
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 1d65c1d #1 2025-01-16 18:29:17 ~3 min macos 📦zip
✔️ 1d65c1d #1 2025-01-16 18:29:54 ~4 min ios 📦zip
✔️ 1d65c1d #1 2025-01-16 18:31:05 ~5 min windows 📦zip
✔️ 1d65c1d #1 2025-01-16 18:31:07 ~5 min linux 📦zip
✔️ 1d65c1d #1 2025-01-16 18:31:34 ~6 min android 📦aar
✔️ 1d65c1d #1 2025-01-16 18:31:42 ~6 min macos 📦zip
✖️ 1d65c1d #1 2025-01-16 18:32:38 ~6 min tests-rpc 📄log
✖️ 1d65c1d #1 2025-01-16 18:57:02 ~31 min tests 📄log
✔️ dd8d64c #2 2025-01-17 11:13:24 ~3 min macos 📦zip
✔️ dd8d64c #2 2025-01-17 11:13:50 ~3 min windows 📦zip
✔️ dd8d64c #2 2025-01-17 11:14:27 ~4 min ios 📦zip
✔️ dd8d64c #2 2025-01-17 11:15:39 ~5 min linux 📦zip
✔️ dd8d64c #2 2025-01-17 11:16:11 ~6 min android 📦aar
✔️ dd8d64c #2 2025-01-17 11:16:25 ~6 min macos 📦zip
✔️ dd8d64c #2 2025-01-17 11:17:16 ~7 min tests-rpc 📄log
✔️ dd8d64c #2 2025-01-17 11:41:38 ~31 min tests 📄log
✔️ bd9e28c #3 2025-01-23 18:32:56 ~11 min ios 📦zip
✔️ bd9e28c #3 2025-01-23 18:59:44 ~6 min android 📦aar
✖️ bd9e28c #3 2025-01-23 21:33:13 ~31 min tests 📄log
✔️ bd9e28c #3 2025-01-23 23:20:44 ~6 min tests-rpc 📄log
✔️ bd9e28c #3 2025-01-24 10:47:44 ~5 min linux 📦zip
✔️ bd9e28c #3 2025-01-24 11:20:30 ~4 min macos 📦zip
✔️ bd9e28c #3 2025-01-24 11:26:10 ~7 min macos 📦zip
✔️ bd9e28c #3 2025-01-24 13:03:12 ~4 min windows 📦zip
✔️ 3411914 #4 2025-01-27 10:29:22 ~4 min macos 📦zip
✔️ 3411914 #4 2025-01-27 10:30:17 ~4 min windows 📦zip
✔️ 3411914 #4 2025-01-27 10:30:57 ~5 min linux 📦zip
✔️ 3411914 #4 2025-01-27 10:31:28 ~6 min android 📦aar
✔️ 3411914 #4 2025-01-27 10:31:41 ~6 min ios 📦zip
✔️ 3411914 #4 2025-01-27 10:31:42 ~6 min tests-rpc 📄log
✔️ 3411914 #4 2025-01-27 10:32:11 ~6 min macos 📦zip
✔️ 3411914 #4 2025-01-27 10:56:41 ~31 min tests 📄log
✔️ 1cd6410 #5 2025-01-29 10:23:43 ~3 min macos 📦zip
✔️ 1cd6410 #5 2025-01-29 10:24:11 ~4 min ios 📦zip
✔️ 1cd6410 #5 2025-01-29 10:25:44 ~5 min linux 📦zip
✔️ 1cd6410 #5 2025-01-29 10:25:44 ~5 min macos 📦zip
✔️ 1cd6410 #5 2025-01-29 10:25:57 ~5 min windows 📦zip
✔️ 1cd6410 #5 2025-01-29 10:26:05 ~5 min android 📦aar
✔️ 1cd6410 #5 2025-01-29 10:26:45 ~6 min tests-rpc 📄log
✔️ 1cd6410 #5 2025-01-29 10:50:35 ~30 min tests 📄log
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 6bc6fdf #6 2025-01-29 15:49:49 ~4 min macos 📦zip
✔️ 6bc6fdf #6 2025-01-29 15:50:31 ~5 min macos 📦zip
✔️ 6bc6fdf #6 2025-01-29 15:50:32 ~5 min ios 📦zip
✔️ 6bc6fdf #6 2025-01-29 15:50:39 ~5 min windows 📦zip
✔️ 6bc6fdf #6 2025-01-29 15:55:37 ~10 min linux 📦zip
✔️ 6bc6fdf #6 2025-01-29 15:55:45 ~10 min android 📦aar
✖️ 6bc6fdf #6 2025-01-29 15:57:01 ~11 min tests-rpc 📄log
✖️ 6bc6fdf #6 2025-01-29 16:20:35 ~35 min tests 📄log
✖️ 6bc6fdf #7 2025-01-29 20:25:14 ~6 min tests-rpc 📄log
✔️ 6bc6fdf #7 2025-01-29 20:46:12 ~29 min tests 📄log
✔️ 3575b7a #7 2025-01-29 21:59:50 ~3 min macos 📦zip
✔️ 3575b7a #7 2025-01-29 22:00:04 ~3 min ios 📦zip
✔️ 3575b7a #7 2025-01-29 22:00:27 ~4 min windows 📦zip
✔️ 3575b7a #7 2025-01-29 22:01:44 ~5 min macos 📦zip
✔️ 3575b7a #7 2025-01-29 22:01:52 ~5 min linux 📦zip
✔️ 3575b7a #7 2025-01-29 22:02:04 ~5 min android 📦aar
✖️ 3575b7a #8 2025-01-29 22:02:36 ~6 min tests-rpc 📄log
✔️ 3575b7a #8 2025-01-29 22:26:51 ~30 min tests 📄log

Copy link

codecov bot commented Jan 17, 2025

Codecov Report

Attention: Patch coverage is 23.20755% with 814 lines in your changes missing coverage. Please review.

Project coverage is 61.75%. Comparing base (c993c7f) to head (3575b7a).

Files with missing lines Patch % Lines
...s/wallet/requests/router_input_community_params.go 13.29% 136 Missing and 1 partial ⚠️
...t/router/pathprocessor/processor_community_burn.go 6.10% 123 Missing ⚠️
...rocessor/processor_community_deploy_owner_token.go 8.08% 91 Missing ⚠️
...r/pathprocessor/processor_community_mint_tokens.go 10.81% 66 Missing ⚠️
services/wallet/router/router.go 57.03% 42 Missing and 16 partials ⚠️
...pathprocessor/processor_community_deploy_assets.go 14.28% 48 Missing ⚠️
...ocessor/processor_community_deploy_collectibles.go 14.28% 48 Missing ⚠️
...r/pathprocessor/processor_community_remote_burn.go 15.09% 45 Missing ⚠️
services/communitytokens/service.go 21.42% 43 Missing and 1 partial ⚠️
...rocessor/processor_community_set_signer_pub_key.go 16.00% 42 Missing ⚠️
... and 13 more

❌ Your patch check has failed because the patch coverage (23.20%) is below the target coverage (50.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #6261      +/-   ##
===========================================
- Coverage    61.91%   61.75%   -0.17%     
===========================================
  Files          843      849       +6     
  Lines       111287   111406     +119     
===========================================
- Hits         68903    68795     -108     
- Misses       34449    34605     +156     
- Partials      7935     8006      +71     
Flag Coverage Δ
functional 21.56% <19.52%> (+0.01%) ⬆️
unit 60.27% <17.26%> (-0.15%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
node/status_node_services.go 71.19% <100.00%> (ø)
protocol/communities/manager.go 65.95% <ø> (-0.14%) ⬇️
services/ext/service.go 28.19% <100.00%> (ø)
services/wallet/activity/activity_v2.go 74.01% <100.00%> (+0.25%) ⬆️
services/wallet/requests/tx_custom_params.go 50.00% <100.00%> (-16.67%) ⬇️
services/wallet/router/pathprocessor/errors.go 100.00% <ø> (ø)
services/wallet/service.go 89.59% <100.00%> (+0.70%) ⬆️
api/geth_backend.go 54.32% <75.00%> (+0.08%) ⬆️
services/wallet/responses/router_transactions.go 75.60% <0.00%> (-3.88%) ⬇️
services/wallet/routeexecution/manager.go 68.93% <60.00%> (-2.18%) ⬇️
... and 20 more

... and 44 files with indirect coverage changes

Copy link
Member

@jrainville jrainville left a comment

Choose a reason for hiding this comment

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

LGTM

@saledjenic saledjenic force-pushed the move-community-minting-airdrop-to-router-pre-step-1 branch from dd8d64c to bd9e28c Compare January 23, 2025 14:35

var (
ErrEmptyCollectibleName = &errors.ErrorResponse{Code: errors.ErrorCode("WRRC-001"), Details: "empty collectible name"}
ErrEmptyCollectibleSymbol = &errors.ErrorResponse{Code: errors.ErrorCode("WRRC-002"), Details: "empty collectible symbol"}
Copy link
Contributor

Choose a reason for hiding this comment

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

Do these endpoints only apply to Collectibles? I though they were used for assets as well (since there's a Decimals member in the struct)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@dlipicar yes, that's the check we had, look here: https://github.com/status-im/status-go/blob/develop/services/communitytokens/api.go#L87-L103
applicable to deployment parameters for assets and collectibles.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I removed the "collectible" word from the error and made it that way more general.

@saledjenic saledjenic force-pushed the move-community-minting-airdrop-to-router-pre-step-1 branch from bd9e28c to 3411914 Compare January 27, 2025 10:24
@saledjenic saledjenic force-pushed the move-community-minting-airdrop-to-router-pre-step-1 branch from 3411914 to 1cd6410 Compare January 29, 2025 10:19
Copy link

github-actions bot commented Jan 29, 2025

Looks like you have BREAKING CHANGES in your PR.
Please make sure to follow 💔How to introduce breaking changes guide:

Check-list

Copy link
Contributor

@osmaczko osmaczko left a comment

Choose a reason for hiding this comment

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

Looks logical to move this stuff to the wallet, thanks 👍

I would be very careful, though—could you please ask QAs to perform full regression testing for community token management (minting owner token, transferring ownership, etc.) on corresponding desktop PR before merging this?

@@ -270,7 +269,6 @@ type AssetContractData struct {

type CommunityTokensServiceInterface interface {
GetCollectibleContractData(chainID uint64, contractAddress string) (*CollectibleContractData, error)
SetSignerPubKey(ctx context.Context, chainID uint64, contractAddress string, txArgs wallettypes.SendTxArgs, password string, newSignerPubKey string) (string, error)
Copy link
Contributor

Choose a reason for hiding this comment

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

I couldn't find how the signer pubkey is set after the changes?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@osmaczko it's not used as an explicit API endpoint anymore but goes over the router now, because at the end that's just a tx.

@saledjenic
Copy link
Contributor Author

saledjenic commented Jan 29, 2025

I would be very careful, though—could you please ask QAs to perform full regression testing for community token management (minting owner token, transferring ownership, etc.) on corresponding desktop PR before merging this?

@osmaczko QAs have already tested the desktop PR status-im/status-desktop#17010

…quests package

`DeploymentParameters` and `DeploymentDetails` types moved from `communitytokens` package
to `requests` of the wallet service.
…outer

- new file `contracts/community-tokens/contracts.go` added to unify contracts creation

- the following community related path processors added:
- `CommunityBurnProcessor`
- `CommunityDeployAssetsProcessor`
- `CommunityDeployCollectiblesProcessor`
- `CommunityDeployOwnerTokenProcessor`
- `CommunityMintTokensProcessor`
- `CommunityRemoteBurnProcessor`
- `CommunitySetSignerPubKeyProcessor`

- `SendType` extended with appropriate options

- added endpoints to duplicated `communitytokens` api:
- `StoreDeployedCollectibles`
- `StoreDeployedOwnerToken`
- `StoreDeployedAssets`

- removed endpoints from duplicated `communitytokens` api:
- `DeployCollectibles`
- `DeployOwnerToken`
- `ReTrackOwnerTokenDeploymentTransaction`
- `DeployAssets`
- `DeployCollectiblesEstimate`
- `DeployAssetsEstimate`
- `DeployOwnerTokenEstimate`
- `EstimateMintTokens`
- `EstimateRemoteBurn`
- `EstimateBurn`
- `EstimateSetSignerPubKey`
- `NewOwnerTokenInstance`
- `NewCommunityTokenDeployerInstance`
- `NewCommunityOwnerTokenRegistryInstance`
- `NewCollectiblesInstance`
- `NewAssetsInstance`
- `MintTokens`
- `RemoteBurn`
- `GetCollectiblesContractInstance`
- `GetAssetContractInstance`
- `Burn`
- `SetSignerPubKey`

- `Path` type extended with new property:
- `UsedContractAddress` - an address of the contract that will be used for the transaction
This is a breaking change which removes `communitytokens` package.

This commit removes old `communitytokens` package, cause previously added `communitytokensv2` package,
which is in use now, will be renamed to `communitytokens` in next commit.
This is a breaking change which renames `communitytokensv2` package to `communitytokens`.
@saledjenic saledjenic force-pushed the move-community-minting-airdrop-to-router-pre-step-1 branch from 6bc6fdf to 3575b7a Compare January 29, 2025 21:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants