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

(Feat): Implemented Starknet.go support for trace endpoints #25

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

Abhijay007
Copy link

This PR implements the starknet-go support for the following RPC endpoints.

  • starknet_traceTransaction
  • starknet_traceBlockTransactions
  • starknet_simulateTransactions

Fixes: #11

Signed-off-by: Abhijay007 <Abhijay007j@gmail.com>
Copy link

vercel bot commented Feb 17, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
rpc-request-builder ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 27, 2024 8:35am

Signed-off-by: Abhijay007 <Abhijay007j@gmail.com>
Copy link
Contributor

@jelilat jelilat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kindly check starknet.go to understand how these endpoints are implemented

@@ -585,7 +602,14 @@ const TraceMethods = [
console.log(transactionTrace);
});
`,
starknetGo: ``,
starknetGo: `${STARKNET_GO_PREFIX}
result, err := provider.getTransactionTrace(context.Background())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
result, err := provider.getTransactionTrace(context.Background())
transactionHash, _ := utils.HexToFelt("0x7641514f46a77013e80215cdce2e55d5aca49c13428b885c7ecb9d3ddb4ab11")
result, err := provider.TraceTransaction(context.Background(), transactionHash)

@@ -313,7 +317,34 @@ const Builder = () => {
const updateStarknetGoParams = (currentParamsObj: {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updateStarknetGoParams has now been implemeneted. Please rebase

Signed-off-by: Abhijay007 <Abhijay007j@gmail.com>
Signed-off-by: Abhijay007 <Abhijay007j@gmail.com>
Signed-off-by: Abhijay007 <Abhijay007j@gmail.com>
Signed-off-by: Abhijay007 <Abhijay007j@gmail.com>
Signed-off-by: Abhijay007 <Abhijay007j@gmail.com>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove the extra space you added

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I attempted to remove this, but it appears that there is no extra space. Also, I tried fetching the changes from the upstream 'builder' file, but they are exactly the same. I am uncertain why this issue persists.

@@ -814,7 +829,13 @@ const TraceMethods = [
block_id,
},
starknetJs: ``,
starknetGo: ``,
starknetGo: `${STARKNET_GO_PREFIX}
result, err := provider.SimulateTransactions(context.Background(), rpc.BlockID{Tag: "latest"}, transactions, simulationFlags)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

transactions and simulation_flags variables should be defined

Signed-off-by: Abhijay007 <Abhijay007j@gmail.com>
Signed-off-by: Abhijay007 <Abhijay007j@gmail.com>
Signed-off-by: Abhijay007 <Abhijay007j@gmail.com>
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

Successfully merging this pull request may close these issues.

Implement starknet.go support for trace endpoints
2 participants