MetaMask/metamask-sdk

[Bug]: Unsupported evm type bytes[] or bytes32[]

Closed this issue · 2 comments

SDK

Unity

Provide environment information

Cannot convert contract ABI json dues to error

MetaMask SDK Version

2.0.0

MetaMask Mobile app Version

2.0.0

What browser are you using? (if relevant)

No response

How are you deploying your application? (if relevant)

No response

Describe the Bug

Exception: Unsupported evm type bytes[]
evm.net.Generator.ContractInterfaceGenerator.BuildParameter (evm.net.Models.ABI.ABIParameter parameter) (at <4d5d29ec07e94c2fbac6ecd780578817>:0)
System.Linq.Enumerable+SelectArrayIterator2[TSource,TResult].MoveNext () (at <f37d63bf724b4debb9eecb3c7c2abb7e>:0) System.Linq.Enumerable+AppendPrependIterator1[TSource].LoadFromEnumerator () (at :0)
System.Linq.Enumerable+AppendPrepend1Iterator1[TSource].MoveNext () (at <f37d63bf724b4debb9eecb3c7c2abb7e>:0) System.String.Join (System.String separator, System.Collections.Generic.IEnumerable1[T] values) (at <4b234520e36749be9cf6b053d911690f>:0)
evm.net.Generator.ContractInterfaceGenerator.BuildParameters (evm.net.Models.ABI.ABIParameter[] parameters) (at <4d5d29ec07e94c2fbac6ecd780578817>:0)
evm.net.Generator.ContractInterfaceGenerator.WriteABIFunction (evm.net.Models.ABI.ABIFunction def) (at <4d5d29ec07e94c2fbac6ecd780578817>:0)
evm.net.Generator.ContractInterfaceGenerator.WriteFunction (evm.net.Models.ABI.ABIDef def) (at <4d5d29ec07e94c2fbac6ecd780578817>:0)
evm.net.Generator.ContractInterfaceGenerator.DoWrite () (at <4d5d29ec07e94c2fbac6ecd780578817>:0)
evm.net.Generator.CodeGenerator.Write (System.Boolean force) (at <4d5d29ec07e94c2fbac6ecd780578817>:0)
evm.net.Generator.CodeGenerator.GenerateString () (at <4d5d29ec07e94c2fbac6ecd780578817>:0)
evm.net.Generator.CodeGenerator.GenerateAll () (at <4d5d29ec07e94c2fbac6ecd780578817>:0)
ContractGeneratorEditor.OnGUI () (at Assets/MetaMask/Plugins/Libraries/evm.net/Editor/ContractGeneratorEditor.cs:86)
UnityEditor.HostView.InvokeOnGUI (UnityEngine.Rect onGUIPosition) (at <24e1ed8728684ea3ae446f80787d18de>:0)
UnityEditor.DockArea.DrawView (UnityEngine.Rect dockAreaRect) (at <24e1ed8728684ea3ae446f80787d18de>:0)
UnityEditor.DockArea.OldOnGUI () (at <24e1ed8728684ea3ae446f80787d18de>: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 <05f2afe6185f419bbdba66c4cec39481>:0)
UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <05f2afe6185f419bbdba66c4cec39481>:0)
UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <05f2afe6185f419bbdba66c4cec39481>:0)
UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, System.Boolean canAffectFocus) (at <05f2afe6185f419bbdba66c4cec39481>:0)
UnityEngine.UIElements.IMGUIContainer.SendEventToIMGUIRaw (UnityEngine.UIElements.EventBase evt, System.Boolean canAffectFocus, System.Boolean verifyBounds) (at <05f2afe6185f419bbdba66c4cec39481>:0)
UnityEngine.UIElements.IMGUIContainer.SendEventToIMGUI (UnityEngine.UIElements.EventBase evt, System.Boolean canAffectFocus, System.Boolean verifyBounds) (at <05f2afe6185f419bbdba66c4cec39481>:0)
UnityEngine.UIElements.IMGUIContainer.ProcessEvent (UnityEngine.UIElements.EventBase evt) (at <05f2afe6185f419bbdba66c4cec39481>:0)
UnityEngine.UIElements.CallbackEventHandler.HandleEvent (UnityEngine.UIElements.EventBase evt) (at <05f2afe6185f419bbdba66c4cec39481>:0)
UnityEngine.UIElements.CallbackEventHandler.HandleEventAtCurrentTargetAndPhase (UnityEngine.UIElements.EventBase evt) (at <05f2afe6185f419bbdba66c4cec39481>:0)
UnityEngine.UIElements.CallbackEventHandler.HandleEventAtTargetPhase (UnityEngine.UIElements.EventBase evt) (at <05f2afe6185f419bbdba66c4cec39481>:0)
UnityEngine.UIElements.MouseCaptureDispatchingStrategy.DispatchEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at <05f2afe6185f419bbdba66c4cec39481>:0)
UnityEngine.UIElements.EventDispatcher.ApplyDispatchingStrategies (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, System.Boolean imguiEventIsInitiallyUsed) (at <05f2afe6185f419bbdba66c4cec39481>:0)
UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at <05f2afe6185f419bbdba66c4cec39481>:0)
UnityEngine.UIElements.EventDispatcher.ProcessEventQueue () (at <05f2afe6185f419bbdba66c4cec39481>:0)
UnityEngine.UIElements.EventDispatcher.OpenGate () (at <05f2afe6185f419bbdba66c4cec39481>:0)
UnityEngine.UIElements.EventDispatcherGate.Dispose () (at <05f2afe6185f419bbdba66c4cec39481>:0)
UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at <05f2afe6185f419bbdba66c4cec39481>:0)
UnityEngine.UIElements.EventDispatcher.Dispatch (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, UnityEngine.UIElements.DispatchMode dispatchMode) (at <05f2afe6185f419bbdba66c4cec39481>:0)
UnityEngine.UIElements.BaseVisualElementPanel.SendEvent (UnityEngine.UIElements.EventBase e, UnityEngine.UIElements.DispatchMode dispatchMode) (at <05f2afe6185f419bbdba66c4cec39481>:0)
UnityEngine.UIElements.UIElementsUtility.DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) (at <05f2afe6185f419bbdba66c4cec39481>:0)
UnityEngine.UIElements.UIElementsUtility.UnityEngine.UIElements.IUIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& eventHandled) (at <05f2afe6185f419bbdba66c4cec39481>:0)
UnityEngine.UIElements.UIEventRegistration.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at <05f2afe6185f419bbdba66c4cec39481>:0)
UnityEngine.UIElements.UIEventRegistration+<>c.<.cctor>b__1_2 (System.Int32 i, System.IntPtr ptr) (at <05f2afe6185f419bbdba66c4cec39481>:0)
UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& result) (at :0)

Expected Behavior

it should support bytes[] and bytes32[]

Link to reproduction - Issues with a link to complete (but minimal) reproduction code will be addressed faster

No response

To Reproduce

evm.net.models.generator should support bytes[] and bytes32[]

Please also notice
Exception: Unsupported evm type tuple[]

Hi all! This should be fixed with the latest release 2.0.1.