You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: return full transaction data instead of hashes only (#257)
This pull request focuses on changing the return type of several methods
from `string` to `types.TransactionResult` across multiple files to
improve consistency and clarity in handling transaction data. The most
important changes include updates to method signatures, test cases, and
related function calls.
### Method Signature Updates:
* Changed the return type of `SetConfig` in `sdk/configurer.go` to
`types.MinedTransaction`
[[1]](diffhunk://#diff-77955b40ad4798ce453e03b09fb04927044a5d5a73371015e4064c10ffaf6570L10-R10)
[[2]](diffhunk://#diff-6b3de348a297b177e712c1e8a3c1a0f785ab569fbb44a169c9af04aa2778ba7aL32-R40).
* Updated the `SetRoot` and `Execute` methods in `executable.go` to
return `types.MinedTransaction` instead of `string`
[[1]](diffhunk://#diff-4786426524a45aded810b56bbd0870ea6b2704d9fc9b114a22068470cb2efc67L56-R71)
[[2]](diffhunk://#diff-4786426524a45aded810b56bbd0870ea6b2704d9fc9b114a22068470cb2efc67L93-R110).
* Modified the `ExecuteOperation` and `SetRoot` methods in
`sdk/evm/executor.go` to return `types.MinedTransaction`
[[1]](diffhunk://#diff-dad84c0fda98fb7df28eb97781c597f1c0634aa07e51ee35d1ddc9ad2259dd79L36-R62)
[[2]](diffhunk://#diff-dad84c0fda98fb7df28eb97781c597f1c0634aa07e51ee35d1ddc9ad2259dd79L69-R84).
### Test Case Adjustments:
* Updated test cases in `sdk/evm/configurer_test.go` to validate the new
return type `types.MinedTransaction`.
* Adjusted test cases in `sdk/evm/executor_test.go` to check for
`tx.Hash` instead of `txHash`
[[1]](diffhunk://#diff-e6dfdd05c6490abd35c142afb88593f28c19bd3252e8d32b59855ea1b4e93695L186-R188)
[[2]](diffhunk://#diff-e6dfdd05c6490abd35c142afb88593f28c19bd3252e8d32b59855ea1b4e93695L338-R344).
### Function Call Changes:
* Replaced `txHash` with `tx.Hash` in various test functions in
`e2e/tests/evm/executable.go`
[[1]](diffhunk://#diff-bbe2ffda1b9ebcc15c396ab8d7423168da6a71a0939b685bbf7c8fb98b85c85fL205-R209)
[[2]](diffhunk://#diff-bbe2ffda1b9ebcc15c396ab8d7423168da6a71a0939b685bbf7c8fb98b85c85fL219-R223)
[[3]](diffhunk://#diff-bbe2ffda1b9ebcc15c396ab8d7423168da6a71a0939b685bbf7c8fb98b85c85fL327-R331)
[[4]](diffhunk://#diff-bbe2ffda1b9ebcc15c396ab8d7423168da6a71a0939b685bbf7c8fb98b85c85fL341-R345)
[[5]](diffhunk://#diff-bbe2ffda1b9ebcc15c396ab8d7423168da6a71a0939b685bbf7c8fb98b85c85fL429-R433)
[[6]](diffhunk://#diff-bbe2ffda1b9ebcc15c396ab8d7423168da6a71a0939b685bbf7c8fb98b85c85fL446-R450).
* Updated function calls in `executable_test.go` to use `tx.Hash`
[[1]](diffhunk://#diff-a58de0dcac6ed4265c64734bdd796348f6d4b120c6abd6a099b3e96ee64bbf7fL193-R195)
[[2]](diffhunk://#diff-a58de0dcac6ed4265c64734bdd796348f6d4b120c6abd6a099b3e96ee64bbf7fL205-R207)
[[3]](diffhunk://#diff-a58de0dcac6ed4265c64734bdd796348f6d4b120c6abd6a099b3e96ee64bbf7fL317-R319)
[[4]](diffhunk://#diff-a58de0dcac6ed4265c64734bdd796348f6d4b120c6abd6a099b3e96ee64bbf7fL329-R331)
[[5]](diffhunk://#diff-a58de0dcac6ed4265c64734bdd796348f6d4b120c6abd6a099b3e96ee64bbf7fL448-R450)
[[6]](diffhunk://#diff-a58de0dcac6ed4265c64734bdd796348f6d4b120c6abd6a099b3e96ee64bbf7fL462-R464)
[[7]](diffhunk://#diff-a58de0dcac6ed4265c64734bdd796348f6d4b120c6abd6a099b3e96ee64bbf7fL588-R590)
[[8]](diffhunk://#diff-a58de0dcac6ed4265c64734bdd796348f6d4b120c6abd6a099b3e96ee64bbf7fL603-R605).
### Documentation Update:
* Changed the example in `docs/usage/set-config.md` to reflect the
updated return type of `SetConfig`.
---------
Co-authored-by: Gustavo Gama <[email protected]>
0 commit comments