-
Notifications
You must be signed in to change notification settings - Fork 240
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
Conversation
Added ViemName to the Chain Setting so that people that are using the AppKit can configure their viemName properly.
…e a lot of issues on importing the packages and we don't have anything related to pasting in our SDK so it doesn't make sense to have it here.
Making sure all providers are now adding/switching their chains if the user is on a wrong one.
Packages/io.chainsafe.web3-unity.loader/Editor/ScopedRegistryInstaller.cs
Outdated
Show resolved
Hide resolved
Packages/io.chainsafe.web3-unity.loader/Editor/ScopedRegistryInstaller.cs
Show resolved
Hide resolved
Packages/io.chainsafe.web3-unity/Runtime/Scripts/ChainConfigEntry.cs
Outdated
Show resolved
Hide resolved
Packages/io.chainsafe.web3-unity/Runtime/Scripts/Connection/ReownConnectionProvider.cs
Outdated
Show resolved
Hide resolved
Packages/io.chainsafe.web3-unity/Runtime/Scripts/Connection/ReownConnectionProvider.cs
Outdated
Show resolved
Hide resolved
Packages/io.chainsafe.web3-unity.loader/Editor/ScopedRegistryInstaller.cs
Outdated
Show resolved
Hide resolved
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.
@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 🫠 |
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.
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
Packages/io.chainsafe.web3-unity.loader/Editor/ScopedRegistryInstaller.cs
Show resolved
Hide resolved
Packages/io.chainsafe.web3-unity/Editor/Web3SettingsEditor.ChainSettings.cs
Outdated
Show resolved
Hide resolved
Packages/io.chainsafe.web3-unity/Editor/Web3SettingsEditor.ChainSettings.cs
Outdated
Show resolved
Hide resolved
Packages/io.chainsafe.web3-unity/Runtime/Scripts/ChainConfigEntry.cs
Outdated
Show resolved
Hide resolved
Packages/io.chainsafe.web3-unity/Runtime/Scripts/Connection/ReownConnectionProvider.cs
Outdated
Show resolved
Hide resolved
Packages/io.chainsafe.web3-unity/Runtime/Scripts/Reown/AppKit/AppKitProvider.cs
Outdated
Show resolved
Hide resolved
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.
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:
But if I click Connect again, I see this:
But, I can't interact with samples that require a provider connected, since I get the error that I'm not connected:
This is not happening with the QR Code of WalletConnect
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.
GJ
I had to go wild and do a lot of things in here so bear with me:
for @juans-chainsafe to test: