How to call a contract static method?

Hello, everyone
Based on the hints given, I learned that this interface should be called to access static methods of the contract at no cost


But the parameters he needs now I don’t understand a little bit, the parameters I get through HTTP packet capture are like this?


Excuse me, what is TXS? How do I generate it?

And what does the packet return? Is there any configuration

In short, check the protocol repository, txs are the rlp-packed, signed and encoded transaction structures.


It seems not only the problem, is the port of this address correct?

1 Like

I found a problem. When setting, the local access is not accessible, so setting it to is ok

1 Like

Are user signatures required when generating TX

did you check the protocol repository and understand the transaction generation process? Also transactions without signature are not valid

Transactions sent to dry-run should NOT be signed, this is to ensure that you don’t accidentally leak transactions that could be posted to the chain…

1 Like

So what does his generation rule look like?
I understand the steps

  1. Sir/madam ContractCallTx (but how should the parameters in it be selected)?
  2. Sign at NewSignedTx
    3.SerializeTx takes a Tx

I’m using the Golang-SDK
The specific code call looks like this

ttlnoncer := transactions.NewTTLNoncer(node)
callTx, err := transactions.NewContractCallTx(address, ctID,new(big.Int), new(big.Int), new(big.Int), config.Client.Contracts.ABIVersion, function,ttlnoncer)
if err != nil {
	return nil, function, err
signedTx := transactions.NewSignedTx([][]byte{}, callTx)
signedTxStr, err := transactions.SerializeTx(signedTx)

I was just one step away. Thank you

The Golang SDK seems to have no way to call static methods and needs to be encapsulated by itself. Will the official continue to maintain the Golang SDK