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

Add MetadataURL to account struct #1103

Merged
merged 6 commits into from
Sep 25, 2019
Merged

Add MetadataURL to account struct #1103

merged 6 commits into from
Sep 25, 2019

Conversation

nambrot
Copy link
Contributor

@nambrot nambrot commented Sep 25, 2019

Description

This PR adds the ability for accounts to register a URL under which relevant metadata can live

Tested

  • Unit tests

Other changes

Added setAccountDataEncryptionKey in the interface.

Related issues

@@ -87,6 +92,9 @@ contract Attestations is IAttestations, Ownable, Initializable, UsingRegistry, R

// The ECDSA public key used to encrypt and decrypt data for this account
bytes dataEncryptionKey;

// The URL under which an account add metadata and claims
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo: adds

@@ -16,12 +16,13 @@ interface IAttestations {

// TODO: For some reason the compiler will complain about the next line
// function setAccountDataEncryptionKey(bytes) external;
// function setMetadataURL(string calldata) external;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this commented out?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The compiler complained about non matching byte codee, same with setting the encryption key ...

* @notice Setter for the metadata of an account.
* @param metadataURL The URL to access the metadata.
*/
function setMetadataURL(string memory metadataURL) public {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't look like this is being used anywhere else in the contract. Is this a requirement for every account and so should be set when creating one? If not, function should be external.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not every account, but external makes sense!

@m-chrzan m-chrzan assigned nambrot and unassigned timmoreton, asaj and m-chrzan Sep 25, 2019
@nambrot nambrot assigned m-chrzan and unassigned nambrot Sep 25, 2019
@nambrot nambrot added the automerge Have PR merge automatically when checks pass label Sep 25, 2019
@nambrot nambrot assigned nambrot and unassigned m-chrzan Sep 25, 2019
@m-chrzan m-chrzan removed the automerge Have PR merge automatically when checks pass label Sep 25, 2019
@m-chrzan m-chrzan added the automerge Have PR merge automatically when checks pass label Sep 25, 2019
@ashishb ashishb merged commit 3757dd4 into master Sep 25, 2019
@ashishb ashishb deleted the nambrot/identity-claims branch September 25, 2019 19:15
@codecov
Copy link

codecov bot commented Sep 25, 2019

Codecov Report

Merging #1103 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1103   +/-   ##
=======================================
  Coverage   66.45%   66.45%           
=======================================
  Files         256      256           
  Lines        7367     7367           
  Branches      427      491   +64     
=======================================
  Hits         4896     4896           
+ Misses       2381     2379    -2     
- Partials       90       92    +2
Flag Coverage Δ
#mobile 66.45% <ø> (ø) ⬆️
Impacted Files Coverage Δ
packages/mobile/src/utils/formatting.ts 87.5% <0%> (ø) ⬆️
packages/mobile/src/identity/reducer.ts 41.66% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 555de6f...6289535. Read the comment docs.

aaronmgdr added a commit that referenced this pull request Sep 25, 2019
* master: (61 commits)
  Remove locales as website is now just in English (#1050)
  Add MetadataURL to account struct (#1103)
  Allow validators to use any valid combination of gold commitments as stake (#885)
  Fix blockscout websocket jsonrpc url (#1096)
  [Wallet] Preliminary iOS support (#1098)
  [Wallet] Set security fee description translation in Spanish (#1097)
  Exclude generated in vscode file watcher setting (#1082)
  Update .env and .env.integration files (#1087)
  Allow a testnet to run without ethstats (#1085)
  Collect exchange rate time series using notification service (#1020)
  Return to preview view when Fee Education is closed (#1068)
  [Wallet] Pin Setup Flow v2 (#1054)
  Added a variable for electoral threshold (#1023)
  [celotool]Store .env config on GCS after deployment (#1086)
  Group size limit (#1035)
  Fix governance unit tests (#1084)
  Add getExchangeRate to ContractKit (#1083)
  [CLI]Unlock till the geth exits (#1070)
  Add Quorum and Refactor Governance (#430)
  Shuffle elected validators using block randomness (#1033)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge Have PR merge automatically when checks pass
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Users SBAT link to metadata
5 participants