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

4351 community token refactoring #14413

Merged
merged 2 commits into from
May 16, 2024
Merged

Conversation

endulab
Copy link
Contributor

@endulab endulab commented Apr 12, 2024

What does the PR do

Move community tokens logic to status-go.

Nim part is only responsible for catching the signal about handled transaction and update UI.
Added CommunityTokenTransactionStatusChangedSignal.

Issue status-im/status-go#4351
status-go pr

self.events.emit(SIGNAL_BURN_STATUS, data)
except Exception as e:
error "Error processing Collectible burn pending transaction event", msg=e.msg, receivedData
self.events.on(SignalType.CommunityTokenTransactionStatusChanged.event) do(e: Args):
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Here's signal is caught and processed.

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.

Looks good. Nice job

self.events.emit(SIGNAL_SET_SIGNER_STATUS, data)

let response = if transactionArgs.success: tokens_backend.registerReceivedOwnershipNotification(contractDetails.communityId) else: tokens_backend.registerSetSignerFailedNotification(contractDetails.communityId)
# TODO move AC notifications to status-go
Copy link
Member

Choose a reason for hiding this comment

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

Is that put in an issue?

Copy link
Member

Choose a reason for hiding this comment

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

When you do, please make sure you emit some notification typeID, instead of moving the texts there :)

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 created this one: #14429

@endulab endulab force-pushed the 4351-community-token-refactoring branch from b89a67b to 3a3a715 Compare April 15, 2024 12:21
@status-im-auto
Copy link
Member

status-im-auto commented Apr 15, 2024

Jenkins Builds

Click to see older builds (12)
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 3a3a715 #2 2024-04-15 12:28:13 ~6 min tests/nim 📄log
✔️ 3a3a715 #2 2024-04-15 12:29:33 ~7 min macos/aarch64 🍎dmg
✔️ 3a3a715 #2 2024-04-15 12:32:59 ~10 min macos/x86_64 🍎dmg
✔️ 3a3a715 #2 2024-04-15 12:33:10 ~10 min tests/ui 📄log
✔️ 3a3a715 #2 2024-04-15 12:37:43 ~15 min linux/x86_64 📦tgz
✔️ 3a3a715 #2 2024-04-15 12:47:02 ~24 min windows/x86_64 💿exe
✔️ 143fad3 #3 2024-04-25 20:09:24 ~6 min macos/aarch64 🍎dmg
✔️ 143fad3 #3 2024-04-25 20:12:09 ~9 min macos/x86_64 🍎dmg
✔️ 143fad3 #3 2024-04-25 20:13:20 ~10 min tests/nim 📄log
✔️ 143fad3 #3 2024-04-25 20:20:02 ~17 min tests/ui 📄log
✔️ 143fad3 #3 2024-04-25 20:25:21 ~22 min linux/x86_64 📦tgz
✔️ 143fad3 #3 2024-04-25 20:27:45 ~24 min windows/x86_64 💿exe
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 4313176 #4 2024-05-06 13:51:40 ~6 min tests/nim 📄log
✔️ 4313176 #4 2024-05-06 13:54:28 ~9 min macos/x86_64 🍎dmg
✔️ 4313176 #4 2024-05-06 13:54:46 ~9 min macos/aarch64 🍎dmg
✔️ 4313176 #4 2024-05-06 13:56:46 ~11 min tests/ui 📄log
✔️ 4313176 #4 2024-05-06 14:05:06 ~19 min linux/x86_64 📦tgz
✔️ 4313176 #4 2024-05-06 14:10:12 ~24 min windows/x86_64 💿exe
✔️ b895efa #5 2024-05-16 14:30:38 ~9 min macos/aarch64 🍎dmg
✔️ b895efa #5 2024-05-16 14:32:11 ~10 min tests/nim 📄log
✔️ b895efa #5 2024-05-16 14:34:16 ~13 min macos/x86_64 🍎dmg
✔️ b895efa #5 2024-05-16 14:34:38 ~13 min tests/ui 📄log
✔️ b895efa #5 2024-05-16 14:39:50 ~18 min linux/x86_64 📦tgz
✔️ b895efa #5 2024-05-16 14:55:20 ~34 min windows/x86_64 💿exe

transactionType*: string
success*: bool
hash*: string
communityToken*: CommunityTokenDto
Copy link
Contributor

Choose a reason for hiding this comment

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

wondering why we need 3 token fields.
Just to understand, do we ever mint/airdrop more than a single token per transaction? I know we mint both the Owner and TM tokens in a single "user action", but those are two separate transactions and two separate events coming from status-go, right?

Copy link
Contributor

Choose a reason for hiding this comment

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

hmm after looking around for a bit, I might be wrong on that one, seems the 2 special tokens belong to the same contract

Copy link
Contributor Author

@endulab endulab Apr 16, 2024

Choose a reason for hiding this comment

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

Nope, owner token and master token deployment is done in a single transaction. We have got a deployer contract to do this. In case of owner token & master token deployment 2 fields are filled in a signal.
If this is community token deployment (or any operation made by a token, eg. burn, mint), communityToken field is filled.

@endulab endulab force-pushed the 4351-community-token-refactoring branch from 3a3a715 to 143fad3 Compare April 25, 2024 20:02
@endulab
Copy link
Contributor Author

endulab commented Apr 26, 2024

@anastasiyaig can you test this ticket before we merge it?
It is about refactoring, so all token operations should work exactly like before.
If you have any questions let me know.
FYI @jrainville

@anastasiyaig
Copy link
Contributor

@endulab sure , i can tests that

@lukaszso lukaszso self-requested a review April 29, 2024 10:52
@lukaszso
Copy link

@endulab i found that after minting is started the status is always stuck at "Minting...". In one case i've waited for over an hour after the trx status changed to Success and the status in app didn't change.
Same happens with airdropping a token. I never receive any confirmation the airdrop was successful, no info in wallet activity either.

@endulab
Copy link
Contributor Author

endulab commented May 6, 2024

Hmm, Thank you @lukaszso. Strange, maybe something is broken in the wallet. I will update pr and test on my side.

@endulab
Copy link
Contributor Author

endulab commented May 6, 2024

@lukaszso any logs with errors? What chain did you use?

@endulab endulab force-pushed the 4351-community-token-refactoring branch from 143fad3 to 4313176 Compare May 6, 2024 13:45
@endulab
Copy link
Contributor Author

endulab commented May 6, 2024

@lukaszso I upgraded branch. Minting works correctly on my side. Can you retest?

Copy link

@lukaszso lukaszso left a comment

Choose a reason for hiding this comment

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

@endulab Maybe the issue was caused by faulty network, no idea. I tried with latest build and it worked fine.

@endulab
Copy link
Contributor Author

endulab commented May 8, 2024

@lukaszso did you test all operations? Like: minting, airdroping, burning, remote destruction? Also would be great to test transfer ownership, because there is a set signer operation.
Also, notifications should work correctly if you close the app in the middle and then run again.

@lukaszso
Copy link

lukaszso commented May 8, 2024

@endulab sorry for not clarifying. I checked minting, airdropping, burning and remote destruction. I'll check notifications and ownership transfer later today and i'll get back to you.

@lukaszso
Copy link

lukaszso commented May 9, 2024

@endulab took a little longer than expected but it works fine. Tried all operations again and, apart from some longer wait times in some cases (prob related to network) there were no issues.

@lukaszso lukaszso added tested and removed testing labels May 9, 2024
@endulab
Copy link
Contributor Author

endulab commented May 13, 2024

@endulab took a little longer than expected but it works fine. Tried all operations again and, apart from some longer wait times in some cases (prob related to network) there were no issues.

@lukaszso can you elaborate on these longer operations? What happened ?

@lukaszso
Copy link

@endulab i was referring to the initial issues with minting tokens. In one case i was stuck for about an hour (haven't checked if it finally succeeded since) and in the other case it took several minutes to update the status from minting to success. This was happening only in my first attempt to test this.

…-go.

Nim part is only responsible for catching the signal about handled transaction and update UI.
Added CommunityTokenTransactionStatusChangedSignal.

Issue #4351
@endulab endulab force-pushed the 4351-community-token-refactoring branch from 4313176 to b895efa Compare May 16, 2024 14:20
@endulab endulab merged commit a776f23 into master May 16, 2024
8 checks passed
@endulab endulab deleted the 4351-community-token-refactoring branch May 16, 2024 15:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Community tokens] Move transaction listening to status-go - improvement
7 participants