The problem(s)
Calling purge from deweb SC fails when using station
To Reproduce
async function handlePurge2() {
setIsPurging(!isPurging);
const callScParams:CallSCParams ={
target: SC?.address || "",
func: "purge",
parameter: Uint8Array.from([]),
}
try {
connectedAccount?.callSC(callScParams
).then((res) => {
res.waitFinalExecution().then((res) => {
console.log("Final Execution", res)
})
})
} catch (e) {
console.error("Error while trying to read SC", e);
}
}
should see:
json: cannot unmarshal object into Go struct field LedgerUpdate.state_changes.ledger_changes.Update.bytecode of type string
Expected behavior(s)
Return Operation
Any other useful info
This may be happening only because we are changing the bytecode in the purge call
we need to change type string towards type bytes: pkg/node/sendoperation/interfaces.go line 115
The problem(s)
Calling purge from deweb SC fails when using station
To Reproduce
should see:
json: cannot unmarshal object into Go struct field LedgerUpdate.state_changes.ledger_changes.Update.bytecode of type stringExpected behavior(s)
Return Operation
Any other useful info
This may be happening only because we are changing the bytecode in the purge call
we need to change type string towards type bytes: pkg/node/sendoperation/interfaces.go line 115