Skip to content
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

readonly callSC is not working #1373

Open
pivilartisant opened this issue Jan 9, 2025 · 0 comments
Open

readonly callSC is not working #1373

pivilartisant opened this issue Jan 9, 2025 · 0 comments
Labels
issue:bug Something isn't working

Comments

@pivilartisant
Copy link
Contributor

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

@pivilartisant pivilartisant added the issue:bug Something isn't working label Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
issue:bug Something isn't working
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

1 participant