uport-project / ethr-did-registry

Ethereum registry for ERC-1056 ethr did methods
Apache License 2.0
178 stars 71 forks source link

update compiler version and remove deprecated entities #45

Closed nichonien closed 2 years ago

nichonien commented 2 years ago

This PR contains changes :

  1. Upgrade compiler version
  2. Replaces now with block.timestamp
  3. Replaces byte with bytes1
  4. Updates keccak256 implementation to one parameter implementation (latest version)
  5. Updates 0x0 address to full length address
nichonien commented 2 years ago

@mirceanis Did you get a chance to look the at PR?

nichonien commented 2 years ago

Excellent work.

It took me a while to test this out since the existing test harness doesn't work on my machine any more. We need to upgrade the test automation here as well if we want to keep improving the contract(s).

I made some suggestions regarding the way the message is hashed in the change/add/remove*Signed() methods, for maintaining compatibility with existing codebases.

Using abi.encodePacked instead of abi.encode allows the caller to use simple concatenation of byte arrays instead of doing RLP encoding of arguments. Also, since there is at most one variable-length array parameter, the warning in the solidity docs does not apply.

Thanks @mirceanis for the feedback. I have made the suggested changes.

I do agree that the tests need to upgraded. It broke for me as well and I could only test it with our test-suite. I guess I could give sometime post next week to improve test cases.

mirceanis commented 2 years ago

BTW, I have started a governance topic about did:ethr upgrades on our discord: https://discord.gg/MTeTAwSYe7

Feel free to join and share your thoughts.

uport-automation-bot commented 2 years ago

:tada: This PR is included in version 1.0.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: