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

feat(issuer): Smart Contract Improvements #2341

Merged
merged 8 commits into from
May 10, 2021
Merged

Conversation

josipbagaric
Copy link
Contributor

@josipbagaric josipbagaric commented Apr 23, 2021

  • Use OpenZeppelin ERC-1155 instead of a custom implementation
  • Create a different smart contract for private certificate issuance PrivateIssuer.sol
  • Remove encodeData and decodeData from smart contracts, since we now have an off-chain implementation
  • Add privateIssuer contract as an optional contract to BlockchainProperties
  • ~1500 lines of code removed 🥳

…ivate Issuer contract

BREAKING CHANGE: There is a new set of Issuer and Registry smart contracts that is based on OpenZeppelin's ERC-1155 contracts and not backwards compatible with the previous smart contracts
… OpenZeppelin instead of Origin implementation

BREAKING CHANGE: New smart contracts incompatible with the previous smart contracts
@josipbagaric josipbagaric changed the title feat(issuer): Update ERC-1155 contracts feat(issuer): Smart Contract Improvements May 5, 2021
@josipbagaric josipbagaric marked this pull request as ready for review May 5, 2021 14:01
Copy link
Contributor

@soanvig soanvig left a comment

Choose a reason for hiding this comment

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

Not really useful comments, but I don't understand what's happening here :/


wrap(signerOrPrivateKey?: Signer | string): IBlockchainProperties {
const web3 = getProviderWithFallback(this.rpcNode, this.rpcNodeFallback);
const web3 = getProviderWithFallback(
...[this.rpcNode, this.rpcNodeFallback].filter((url) => !!url)
Copy link
Contributor

Choose a reason for hiding this comment

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

Just a super NIT, but for that kind of functions it's nice to have a helper. lodash has compact.

For this case though maybe you consider .filter(Boolean) since it better explains intention? It's just my opinion though.

@josipbagaric josipbagaric merged commit 50de3af into master May 10, 2021
@josipbagaric josipbagaric deleted the feat/updated-1155 branch May 10, 2021 09:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants