MetaMask / MetaMask/metamask-sdk
[Bug]: Unity Exception: Unsupported evm type tuple[]
@ecp4224 is already working on this.
Since Jul 29, 2024.
- Dominant language
- TypeScript
- Stars
- 338
- Forks
- 260
- PR merge metrics
- No merged PRs in 30d
Description
SDK
Unity
Provide environment information
Unity 2022.3.25f1
MetaMask SDK Version
2.1.0
MetaMask Mobile app Version
What browser are you using? (if relevant)
No response
How are you deploying your application? (if relevant)
No response
Describe the Bug
Hi!
Can't convert contract with next issue:
Exception: Unsupported evm type tuple[]
evm.net.Generator.ContractInterfaceGenerator.WriteABIFunction (evm.net.Models.ABI.ABIFunction def) (at <7f818265f4914b739e860e807cb2a1b7>:0)
evm.net.Generator.ContractInterfaceGenerator.WriteFunction (evm.net.Models.ABI.ABIDef def) (at <7f818265f4914b739e860e807cb2a1b7>:0)
evm.net.Generator.ContractInterfaceGenerator.DoWrite () (at <7f818265f4914b739e860e807cb2a1b7>:0)
evm.net.Generator.CodeGenerator.Write (System.Boolean force) (at <7f818265f4914b739e860e807cb2a1b7>:0)
evm.net.Generator.CodeGenerator.GenerateString () (at <7f818265f4914b739e860e807cb2a1b7>:0)
evm.net.Generator.CodeGenerator.GenerateAll () (at <7f818265f4914b739e860e807cb2a1b7>:0)
ContractGeneratorEditor.OnGUI () (at Assets/MetaMask/Plugins/Libraries/evm.net/Editor/ContractGeneratorEditor.cs:86)
UnityEditor.HostView.InvokeOnGUI (UnityEngine.Rect onGUIPosition) (at <477bdcb097d4488eae58cbed17286dd8>:0)
UnityEditor.DockArea.DrawView (UnityEngine.Rect dockAreaRect) (at <477bdcb097d4488eae58cbed17286dd8>:0)
UnityEditor.DockArea.OldOnGUI () (at <477bdcb097d4488eae58cbed17286dd8>:0)
UnityEngine.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 parentTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout, UnityEngine.Rect layoutSize, System.Action onGUIHandler, System.Boolean canAffectFocus) (at :0)
UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect, System.Action onGUIHandler, System.Boolean canAffectFocus) (at :0)
UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, System.Action onGUIHandler, System.Boolean canAffectFocus) (at :0)
UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, System.Boolean canAffectFocus) (at :0)
UnityEngine.UIElements.IMGUIContainer.SendEventToIMGUIRaw (UnityEngine.UIElements.EventBase evt, System.Boolean canAffectFocus, System.Boolean verifyBounds) (at :0)
UnityEngine.UIElements.IMGUIContainer.SendEventToIMGUI (UnityEngine.UIElements.EventBase evt, System.Boolean canAffectFocus, System.Boolean verifyBounds) (at :0)
UnityEngine.UIElements.IMGUIContainer.ProcessEvent (UnityEngine.UIElements.EventBase evt) (at :0)
UnityEngine.UIElements.CallbackEventHandler.HandleEvent (UnityEngine.UIElements.EventBase evt) (at :0)
UnityEngine.UIElements.CallbackEventHandler.HandleEventAtCurrentTargetAndPhase (UnityEngine.UIElements.EventBase evt) (at :0)
UnityEngine.UIElements.CallbackEventHandler.HandleEventAtTargetPhase (UnityEngine.UIElements.EventBase evt) (at :0)
UnityEngine.UIElements.MouseCaptureDispatchingStrategy.DispatchEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at :0)
UnityEngine.UIElements.EventDispatcher.ApplyDispatchingStrategies (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, System.Boolean imguiEventIsInitiallyUsed) (at :0)
UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at :0)
UnityEngine.UIElements.EventDispatcher.ProcessEventQueue () (at :0)
UnityEngine.UIElements.EventDispatcher.OpenGate () (at :0)
UnityEngine.UIElements.EventDispatcherGate.Dispose () (at :0)
UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at :0)
UnityEngine.UIElements.EventDispatcher.Dispatch (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, UnityEngine.UIElements.DispatchMode dispatchMode) (at :0)
UnityEngine.UIElements.BaseVisualElementPanel.SendEvent (UnityEngine.UIElements.EventBase e, UnityEngine.UIElements.DispatchMode dispatchMode) (at :0)
UnityEngine.UIElements.UIElementsUtility.DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) (at :0)
UnityEngine.UIElements.UIElementsUtility.UnityEngine.UIElements.IUIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& eventHandled) (at :0)
UnityEngine.UIElements.UIEventRegistration.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at :0)
UnityEngine.UIElements.UIEventRegistration+<>c.<.cctor>b__1_2 (System.Int32 i, System.IntPtr ptr) (at :0)
UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& result) (at <701a05767aa048528876500a22329b6c>:0)
Expected Behavior
Contract should be converted successfully.
Link to reproduction - Issues with a link to complete (but minimal) reproduction code will be addressed faster
No response
To Reproduce
- Open Tools - MetaMask - Contract ABI Converted
- Put contract ABI with tuple[] type added. (Here is random contract with tuple )
- Receive exception.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.