Closed m-Peter closed 2 months ago
The changes involve modifications to the main
function across several files in the services/requester/cadence
directory. Each modification simplifies the process of converting a hexadecimal address string into an Ethereum address by replacing the manual byte array manipulation with a direct call to the EVM.addressFromString
function. This results in cleaner and more maintainable code while preserving the original functionality.
Files Grouped | Change Summary |
---|---|
services/requester/cadence/dry_run.cdc , services/requester/cadence/get_balance.cdc , services/requester/cadence/get_code.cdc , services/requester/cadence/get_nonce.cdc |
Each file’s main function was updated to replace the manual conversion of a hexadecimal address string to an EVMAddress with a call to EVM.addressFromString(hexEncodedAddress) , streamlining the code while maintaining functionality. |
sequenceDiagram
participant User
participant EVM
participant MainFunction
User->>MainFunction: Provide hexEncodedAddress
MainFunction->>EVM: addressFromString(hexEncodedAddress)
EVM-->>MainFunction: Return EVMAddress
MainFunction-->>User: Return result
🐰 In the code where bytes did play,
A simpler path has come our way.
No more arrays to twist and turn,
A single call, for which we yearn!
Hooray for change, let's hop and cheer,
For cleaner code is finally here! 🥳
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Description
Make use of built-in functions from
EVM
contract, to parse hex addresses intoEVM.EVMAddress
type. Also remove some unused fixture files.For contributor use:
master
branchFiles changed
in the Github PR explorerSummary by CodeRabbit
New Features
Bug Fixes