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 owner admin frezer issuer accessors to assets precompile #2012

Merged
merged 8 commits into from Dec 23, 2022

Conversation

girazoki
Copy link
Collaborator

What does it do?

Adds owner, issuer, freezer and admin accessors for assets. I added them to the ERC20.sol precompile, although I can also add them only for local assets if requested.

Owner: owner of the asset, can change any other role.
Issuer: account capable of minting tokens for such asset.
Freezer: account capable of freezing an asset.
Admin: account capable of unfreeze and force transfer tokens for an asset.

What important points reviewers should know?

Is there something left for follow-up PRs?

What alternative implementations were considered?

Are there relevant PRs or issues in other repositories (Substrate, Polkadot, Frontier, Cumulus)?

What value does it bring to the blockchain users?

@girazoki girazoki changed the title Add owner admin frezer issuer accessors to precompile Add owner admin frezer issuer accessors to assets precompile Dec 20, 2022
@girazoki girazoki added B7-runtimenoteworthy Changes should be noted in any runtime-upgrade release notes D5-nicetohaveaudit⚠️ PR contains trivial changes to logic that should be properly reviewed. labels Dec 20, 2022
@girazoki girazoki marked this pull request as ready for review December 22, 2022 10:59
Copy link
Contributor

@nanocryk nanocryk left a comment

Choose a reason for hiding this comment

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

LGTM. Made a small suggestion to improve the tests.

precompiles/assets-erc20/src/tests.rs Outdated Show resolved Hide resolved
@girazoki girazoki merged commit bd9d557 into master Dec 23, 2022
@girazoki girazoki deleted the girazoki-add-more-information-to-asset-precompiles branch December 23, 2022 15:59
@notlesh notlesh added D1-audited👍 PR contains changes to fund-managing logic that has been properly reviewed and externally audited and removed D5-nicetohaveaudit⚠️ PR contains trivial changes to logic that should be properly reviewed. labels Feb 14, 2023
imstar15 pushed a commit to OAK-Foundation/moonbeam that referenced this pull request May 16, 2023
…m-foundation#2012)

* Add owner admin frezer issuer accessors to precompile

* Moves role accesors to its own solidity file

* typescript test

* prettier

Signed-off-by: girazoki <gorka.irazoki@gmail.com>

* formatting issues

* rework tests to use different accounts

* typescript tests, different account for roles

Signed-off-by: girazoki <gorka.irazoki@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
B7-runtimenoteworthy Changes should be noted in any runtime-upgrade release notes D1-audited👍 PR contains changes to fund-managing logic that has been properly reviewed and externally audited
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants