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

ReadOnlyCall errors when omitting optional parameters. #65

Open
edatts opened this issue Apr 27, 2024 · 0 comments
Open

ReadOnlyCall errors when omitting optional parameters. #65

edatts opened this issue Apr 27, 2024 · 0 comments

Comments

@edatts
Copy link

edatts commented Apr 27, 2024

Hello, I was attempting to make a read only smart contract call to the Dusa Factory Contract on Buildnet using the gRPC APIs and ran into an error.

What happened:

I executed a read only call on a contract without specifying a caller address and received an error:

rpc error: code = Internal desc = Runtime error: spending address <RANDOM_ADDRESS> not found

I executed a read only call on a contract without specifying a fee and received an error:

rpc error: code = InvalidArgument desc = fee is too low provided: 0 , minimal_fees required: 0.01

What I expected:

The following comments mark the Address and Fee fields as optional so I expected that I could make a read-only contract call without specifying an address or a fee.

// Caller's address, (Optional) if not set, an auto-generated address will be used

// fee paid by the caller when the call is processed (optional)

Since read-only calls do not change the state of the contract or ledger I am not sure why I cannot make a read only call with addresses that do not yet have associated datastore entries or without specifying a fee?

@edatts edatts changed the title Misleading field comment ReadOnlyCall errors when omitting optional parameters. Apr 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant