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

refactor(plugin-htlc-eth-besu): stop using the deprecated api.encodePacked #2538

Merged
merged 1 commit into from
Jul 24, 2023

Commits on Jul 24, 2023

  1. refactor(plugin-htlc-eth-besu): stop using the deprecated api.encodeP…

    …acked
    
    1. Add tests to vanilla HashTimeLock
    2. Replace abi.encodePacked by abi.encode
    3. Compile and replace generated ABIs (for HashTimeLock and PrivateHashTimeLock)
    
    Peter's additional changes:
    1. Replace all the function calls that were missed.
    2. Also update the hash function from sha256 to keccak256 where it was missed
    3. Recompile the contracts again but with the VScode extension that gives them
    the additional properties with their metadata like the contract name that we
    use during deployment.
    4. Modify the test case so that it computes the hash for the contract ID
    purely in Javascript instead of doing a call to the EVM to do the same.
    
    Co-authored-by: Peter Somogyvari <peter.somogyvari@accenture.com>
    
    Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>
    Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
    RafaelAPB authored and petermetz committed Jul 24, 2023
    Configuration menu
    Copy the full SHA
    f4f7516 View commit details
    Browse the repository at this point in the history