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

AppKit is now part of the core solution #1259

Merged
merged 44 commits into from
Jan 16, 2025

Conversation

kantagara
Copy link
Contributor

@kantagara kantagara commented Dec 13, 2024

I had to go wild and do a lot of things in here so bear with me:

  • Removed all Reown dlls from the core package
  • Added AppKit as a dependency for our core solution from openUPM
  • All the other Reown stuff is also coming from the openUPM, solving major painpoint for devs that have some other openUPM dependencies on the Reown itself
  • Created a loader package that is only used for people downloading our project directly from github (as they did before), so now they would download our loader that would then download our project from openUPM (currently, it's still trough github) and install all the necessary dependencies.

for @juans-chainsafe to test:

@kantagara kantagara added the ready-to-merge Ready to Merge PR - this'll trigger required checks label Dec 13, 2024
Copy link
Contributor

@juans-chainsafe juans-chainsafe left a comment

Choose a reason for hiding this comment

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

Not sure if I need to configure something before, but I get this error with Reown in WebGL:

Screenshot 2024-12-13 at 5 34 13 PM Screenshot 2024-12-13 at 5 34 24 PM

@kantagara
Copy link
Contributor Author

@juans-chainsafe wtf 😁 Can you try and re-import the project? Go to Assets / Reimport All? You shouldn't configure anything. I've tested this in multiple environments and never encountered that issue 🫠

Copy link
Contributor

@juans-chainsafe juans-chainsafe left a comment

Choose a reason for hiding this comment

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

Getting a different error now, is a build error for WebGL:

NullReferenceException: Object reference not set to an instance of an object
ChainSafe.Gaming.UnityPackage.Connection.ReownConnectionProvider.OnValidate () (at /Users/juanmanuelspoleti/Desktop/workspace/web3.unity/Packages/io.chainsafe.web3-unity/Runtime/Scripts/Connection/ReownConnectionProvider.cs:122)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&) (at /Users/bokken/build/output/unity/unity/Modules/IMGUI/GUIUtility.cs:203)

Error building Player: NullReferenceException: Object reference not set to an instance of an object

Build completed with a result of 'Failed' in 14 seconds (14155 ms)
2 errors
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&) (at /Users/bokken/build/output/unity/unity/Modules/IMGUI/GUIUtility.cs:203)

I believe related to the latest commits

Copy link
Contributor

@juans-chainsafe juans-chainsafe left a comment

Choose a reason for hiding this comment

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

A couple of things to fix.

Happening in WebGL and editor:

  • OwnerOfBatch in ERC-721 is not working
Web3Exception: Can't execute GetOwnerOfBatch. No MultiCall component was provided during construction. If you are using Web3Unity component, make sure to add the Multicall service adapter to the same game object.
ChainSafe.Gaming.Evm.Contracts.BuiltIn.Erc721Contract.GetOwnerOfBatch (System.String[] tokenIds) (at <80046133f72547e2a013e701f54c2118>:0)
Erc721Sample.OwnerOfBatch () (at Assets/Samples/web3.unity SDK/3.0.6/Web3.Unity Samples/Scripts/Samples/Erc721Sample.cs:99)
Samples.TryExecute (System.Reflection.MethodInfo method, ChainSafe.Gaming.ISample instance) (at /Users/juanmanuelspoleti/Desktop/workspace/web3.unity/Packages/io.chainsafe.web3-unity/Runtime/Scripts/Samples/Samples.cs:97)
System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.<ThrowAsync>b__7_0 (System.Object state) (at <606c2e0a56af495988c860a4ac613e74>:0)
UnityEngine.UnitySynchronizationContext+WorkRequest.Invoke () (at /Users/bokken/build/output/unity/unity/Runtime/Export/Scripting/UnitySynchronizationContext.cs:153)
UnityEngine.UnitySynchronizationContext.Exec () (at /Users/bokken/build/output/unity/unity/Runtime/Export/Scripting/UnitySynchronizationContext.cs:83)
UnityEngine.UnitySynchronizationContext.ExecuteTasks () (at /Users/bokken/build/output/unity/unity/Runtime/Export/Scripting/UnitySynchronizationContext.cs:107)
  • Multicall sample in More Examples is not working
InvalidOperationException: No service for type 'ChainSafe.Gaming.MultiCall.IMultiCall' has been registered.
Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService (System.IServiceProvider provider, System.Type serviceType) (at <1ba52dc0b103422eba91ad87a1aa9fe3>:0)
Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService[T] (System.IServiceProvider provider) (at <1ba52dc0b103422eba91ad87a1aa9fe3>:0)
ChainSafe.Gaming.MultiCall.MultiCallExtensions.MultiCall (ChainSafe.Gaming.Web3.Web3 web3) (at <80046133f72547e2a013e701f54c2118>:0)
EvmSample.MultiCall () (at Assets/Samples/web3.unity SDK/3.0.6/Web3.Unity Samples/Scripts/Samples/EvmSample.cs:276)
Samples.TryExecute (System.Reflection.MethodInfo method, ChainSafe.Gaming.ISample instance) (at /Users/juanmanuelspoleti/Desktop/workspace/web3.unity/Packages/io.chainsafe.web3-unity/Runtime/Scripts/Samples/Samples.cs:97)
System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.<ThrowAsync>b__7_0 (System.Object state) (at <606c2e0a56af495988c860a4ac613e74>:0)
UnityEngine.UnitySynchronizationContext+WorkRequest.Invoke () (at /Users/bokken/build/output/unity/unity/Runtime/Export/Scripting/UnitySynchronizationContext.cs:153)
UnityEngine.UnitySynchronizationContext.Exec () (at /Users/bokken/build/output/unity/unity/Runtime/Export/Scripting/UnitySynchronizationContext.cs:83)
UnityEngine.UnitySynchronizationContext.ExecuteTasks () (at /Users/bokken/build/output/unity/unity/Runtime/Export/Scripting/UnitySynchronizationContext.cs:107)

Happening only in WebGL with Metamask:

  • When you connect to Metamask, the wallet is not connected in our UI, is still showing the Connect button:
Screenshot 2024-12-17 at 10 54 57 AM

But if I click Connect again, I see this:
Screenshot 2024-12-17 at 10 55 43 AM

But, I can't interact with samples that require a provider connected, since I get the error that I'm not connected:
Screenshot 2024-12-17 at 10 56 36 AM

This is not happening with the QR Code of WalletConnect

Copy link
Contributor

@creeppak creeppak left a comment

Choose a reason for hiding this comment

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

GJ

@kantagara kantagara merged commit 32c35b9 into dev Jan 16, 2025
1 check passed
@kantagara kantagara deleted the nikola/appkit-implementation-1210 branch January 16, 2025 16:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-to-merge Ready to Merge PR - this'll trigger required checks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants