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

Implement an api endpoint to allow read only calls to smart contract #701

Closed
Elli610 opened this issue May 30, 2023 · 8 comments · Fixed by #1309 or #1310
Closed

Implement an api endpoint to allow read only calls to smart contract #701

Elli610 opened this issue May 30, 2023 · 8 comments · Fixed by #1309 or #1310
Assignees

Comments

@Elli610
Copy link

Elli610 commented May 30, 2023

Allowing read-only calls on smart contracts is essential. This allows users to read public values present in contracts without having to pay for a transaction since these operations do not modify the state of the blockchain.

cc @SlnPons @gregLibert

@SlnPons
Copy link
Contributor

SlnPons commented May 30, 2023

Isn't the objective of the block API?

@Elli610
Copy link
Author

Elli610 commented May 31, 2023

IDK. What is this ?

@SlnPons
Copy link
Contributor

SlnPons commented May 31, 2023

Not a question for you @Elli610 😅 sorry. Will handle this and come back to you, no worries :)

@gregLibert
Copy link
Contributor

Isn't the objective of the block API?

Nope. here we want the equivalent of the node api endpoint execute_read_only_bytecode.

@Thykof
Copy link
Contributor

Thykof commented Nov 21, 2023

related to #1269 because we are adding a function to do the read only call.

This issue can benefit from the presence of that function to just add the endpoint and plug to that function.

@gregLibert
Copy link
Contributor

related to #1269 because we are adding a function to do the read only call.

This issue can benefit from the presence of that function to just add the endpoint and plug to that function.

Should we close this issue then ?

@Thykof
Copy link
Contributor

Thykof commented Dec 27, 2023

related to #1269 because we are adding a function to do the read only call.
This issue can benefit from the presence of that function to just add the endpoint and plug to that function.

Should we close this issue then ?

no, we have now the functions to estimate gas for a callsc and execute sc, we need to add endpoints to expose those functions (if it's a need).

something like:

  • POST /cmd/estimate-gas/callsc
  • POST /cmd/estimate-gas/executesc

@Thykof Thykof linked a pull request Jan 3, 2024 that will close this issue
12 tasks
@Thykof Thykof self-assigned this Jan 3, 2024
@Thykof Thykof linked a pull request Jan 4, 2024 that will close this issue
10 tasks
@Thykof
Copy link
Contributor

Thykof commented Jan 9, 2024

we have another PR to merge

@Thykof Thykof reopened this Jan 9, 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
5 participants