-
Notifications
You must be signed in to change notification settings - Fork 276
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
[fix] #2227: Implement Register and Unregister for Asset #2333
[fix] #2227: Implement Register and Unregister for Asset #2333
Conversation
Codecov Report
@@ Coverage Diff @@
## iroha2-dev #2333 +/- ##
==============================================
+ Coverage 65.50% 69.96% +4.46%
==============================================
Files 133 140 +7
Lines 24697 27803 +3106
==============================================
+ Hits 16177 19452 +3275
+ Misses 8520 8351 -169
Continue to review full report at Codecov.
|
cdbc8ff
to
f786f2c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change is important for SDK developers. Need to update with #api_changes.
f786f2c
to
381dfd8
Compare
381dfd8
to
af34818
Compare
core/src/smartcontracts/isi/asset.rs
Outdated
@@ -355,7 +403,6 @@ pub mod isi { | |||
AssetValueType::BigQuantity, | |||
)?; | |||
|
|||
wsv.asset_or_insert(&self.destination_id, 0_u128)?; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Erigara Be advised that this PR will conflict with your work.
af34818
to
5e26f12
Compare
I'll approve when all tests will pass |
5e26f12
to
00b23ad
Compare
Oh, yes, haven't think about it... |
The APIs are comparably simple, but in different ways. If you retained the Moreover, we will need to synchronise the behaviour of Both approaches are valid: in the CPU world what you propose is called CISC, while my stance is closer to RISC with SIMD. I personally would prefer that we kept the API changes in this PR to a minimum, but will approve given a good justification. |
Right, my stance on this was the way it was mostly because I confused AssetDefinition and Asset in regards to Mintable.
I have one question in regards to that - in this implementation one can register Mintable::Once asset to any number of accounts as long as Register has value 0. Are we okay with that? |
3afc1a6
to
f851ef5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. But you should probably address marin's comment.
c974c83
to
2172a1e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Signed-off-by: Artemii Gerasimovich <gerasimovich@soramitsu.co.jp>
…count for (un)registering an asset Signed-off-by: Artemii Gerasimovich <gerasimovich@soramitsu.co.jp>
Signed-off-by: Artemii Gerasimovich <gerasimovich@soramitsu.co.jp>
Signed-off-by: Artemii Gerasimovich <gerasimovich@soramitsu.co.jp>
Signed-off-by: Artemii Gerasimovich <gerasimovich@soramitsu.co.jp>
Signed-off-by: Artemii Gerasimovich <gerasimovich@soramitsu.co.jp>
2172a1e
to
07c2a6f
Compare
…yperledger#2333) Signed-off-by: Artemii Gerasimovich <gerasimovich@soramitsu.co.jp> Signed-off-by: BAStos525 <jungle.vas@yandex.ru>
Description of the Change
Issue
Resolves #2227
Benefits
Consistency, no more "unsupported" Register/Unregister instructions
Possible Drawbacks
Register asset and Mint should now be considered together when implementing permission systems.