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

Transaction trace #6706

Open
zees-dev opened this issue Nov 9, 2024 · 0 comments
Open

Transaction trace #6706

zees-dev opened this issue Nov 9, 2024 · 0 comments
Labels
enhancement New feature or request triage This issue was opened with a template and needs to be triaged by code owners.

Comments

@zees-dev
Copy link
Contributor

zees-dev commented Nov 9, 2024

Related Component

forc

Problem you are trying to solve

The sway tooling needs to support transaction traces such that one can analyze the pathways of code executed within a transaction.

For example; when using the foundry tooling one can do this:

# > cast send --private-key $RAW_PRIVATE_KEY 0x0000B3965781EEF2BdB59A9dB31AB854B44A4Bff --value 31ether                                            

blockHash               0xca7e0a17b131d10e24f7b87759f1b3534425987f7beae14afa8727341f781d24
blockNumber             1
contractAddress         
cumulativeGasUsed       21000
effectiveGasPrice       1000000001
from                    0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266
gasUsed                 21000
logs                    []
logsBloom               0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
root                    0x4c86387576fcdd67cdda3b8339bc0c37006346c79b03a8d818d386053fc06b85
status                  1 (success)
transactionHash         0x80bf15b8150af8572ba4d62bfa8afe499ffba7fc9110439eb5510113846515bf
transactionIndex        0
type                    2
blobGasPrice            1
blobGasUsed             
authorizationList       
to                      0x0000B3965781EEF2BdB59A9dB31AB854B44A4Bff
# > cast run 0x80bf15b8150af8572ba4d62bfa8afe499ffba7fc9110439eb5510113846515bf 

Executing previous transactions from the block.
Traces:
  [0] 0x0000B3965781EEF2BdB59A9dB31AB854B44A4Bff::fallback{value: 31000000000000000000}()
    └─ ← [Stop] 


Transaction successfully executed.
Gas used: 21000

In the example above a simple ether transfer transaction is executed using the cast tooling; one can get a call trace of the transaction using cast run command.
It would be great to have an equivalent, or atleast some way to dive deeper into the call trace of a transaction on the fuelvm.

Solution you'd like

A forc tooling equivalent to obtain a call trace. Will most likely need to be a sub-command or a new CLI tool equivalent to cast.

Notes

No response

@zees-dev zees-dev added enhancement New feature or request triage This issue was opened with a template and needs to be triaged by code owners. labels Nov 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request triage This issue was opened with a template and needs to be triaged by code owners.
Projects
None yet
Development

No branches or pull requests

1 participant