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 (32)
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
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 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
✔️ 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

Copy link

codecov bot commented Jan 17, 2025

Codecov Report

Attention: Patch coverage is 42.30769% with 30 lines in your changes missing coverage. Please review.

Project coverage is 61.87%. Comparing base (06d2419) to head (1cd6410).

Files with missing lines Patch % Lines
services/communitytokens/api.go 0.00% 26 Missing ⚠️
...s/wallet/requests/router_input_community_params.go 87.50% 2 Missing and 1 partial ⚠️
services/communitytokens/manager.go 50.00% 1 Missing ⚠️

❌ Your patch check has failed because the patch coverage (42.30%) 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.84%   61.87%   +0.03%     
===========================================
  Files          843      844       +1     
  Lines       111287   111289       +2     
===========================================
+ Hits         68823    68862      +39     
+ Misses       34497    34475      -22     
+ Partials      7967     7952      -15     
Flag Coverage Δ
functional 21.66% <9.61%> (+0.02%) ⬆️
unit 60.35% <40.38%> (+0.05%) ⬆️

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

Files with missing lines Coverage Δ
services/communitytokens/estimations.go 0.00% <ø> (ø)
services/communitytokens/service.go 14.09% <ø> (ø)
services/communitytokens/manager.go 48.00% <50.00%> (ø)
...s/wallet/requests/router_input_community_params.go 87.50% <87.50%> (ø)
services/communitytokens/api.go 1.00% <0.00%> (-5.87%) ⬇️

... and 41 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
…quests package

`DeploymentParameters` and `DeploymentDetails` types moved from `communitytokens` package
to `requests` of the wallet service.
@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
…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`.
Copy link

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?

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