I'm working with the polkadot-sdk-solochain-template and have successfully executed contract calls using JavaScript (via polkadot‑js). However, I'm facing challenges when trying to call smart contract functions using Rust or Golang.
Here's what I'm trying to do:
Contract Address: 5GwFapTKi6iQaqmbGmXtqkruWBCQChY4xDYTLitnrD78FjJp
Contract Name: user
Function: isUserAdded(did: String) -> Result<Result<bool, UserAuthUserError>, InkPrimitivesLangError>
Input Parameter: "test"
Caller Account: 5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty
My main questions are:
Which libraries or frameworks in Rust (or Golang) are recommended for interacting with smart contracts in a Substrate/Polkadot environment?
I've heard that subxt might be a Rust equivalent to polkadot‑js.
How should I handle ABI encoding/decoding in Rust (or Golang) similar to what polkadot‑js does automatically?
I need guidance on encoding the function selector and parameters.
What are the best practices for constructing and submitting extrinsics that interact with smart contracts using the JSON‑RPC interface?
I'm aware there isn’t a direct contract_call RPC method available on the node.
Has anyone successfully implemented smart contract calls in Rust or Golang with these requirements? Any examples, code snippets (or even pseudo-code), or references to projects would be greatly appreciated.
Thanks in advance for your help!