You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the mutan example line if this.data[0] == "heartbeat" {, the "heartbeat" string is converted by mutan to a left-padded hex value. However, if the data argument is prepared in javascript like this: var data = "heartbeat".pad(32).unbin();
the value sent with the transaction is right-padded, causing the mutan if conditional (opcode EQ in the debugger) to fail. A simple fix is to prepare a string data argument like this: var data = "heartbeat".pad(32,0).unbin();
Is String.pad() acting correctly when the 2nd argument is missing?