-
Notifications
You must be signed in to change notification settings - Fork 31
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
sdk: option to allow mint to specific address with mintFor #1910
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1910 +/- ##
=======================================
Coverage 95.61% 95.61%
=======================================
Files 155 155
Lines 5793 5796 +3
Branches 1089 1089
=======================================
+ Hits 5539 5542 +3
Misses 196 196
Partials 58 58
Continue to review full report at Codecov.
|
131979c
to
86a4f43
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.
Stone by stone. You did a lot of coding yesterday. Thanks for your hard work! 💪
const receipt = await callAndWaitMined( | ||
customTokenContract, | ||
'mint', | ||
[decode(UInt(32), amount)], | ||
'mintFor', |
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.
Hmm the docs say that the token contract can either define mint(address, uint256)
, mintFor(uint256, address)
or increaseSupply(uint256, address)
. The last seem to be not relevant. But from the first two: what is the difference in behavior except the signature? Is there definition exclusive? Should we maybe check for both? Or is mintFor
the only one that does what we want now?
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.
We don't support all these interfaces. If you look into the source of the CustomToken contract, you'll see it supports just 2 minting methods: mint(uint256)
, which mints for self, and mintFor(uint256, address)
, which allows minting for a 3rd party. This is a _testing
function, used only on our testnets, and these are always deployed with this contract. It'd be hard for the SDK to support multiple contracts interfaces, so we went with what is actually used.
86a4f43
to
0874921
Compare
Needed for
_testing
's mint functionality of #1692Short description
Add an optional param to specificy the beneficiary of the
mint
transaction.Definition of Done
Steps to manually test the change (dApp)