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

Opcode: MINT #8

Open
Tracked by #5
PaulRBerg opened this issue Sep 22, 2023 · 6 comments
Open
Tracked by #5

Opcode: MINT #8

PaulRBerg opened this issue Sep 22, 2023 · 6 comments
Assignees
Labels
effort: epic Multi-stage task that may require multiple PRs. priority: 0 Do this first before everything else. This is critical and nothing works without this. type: feature New feature or request. work: complex Probe-sense-respond. The relationship between cause and effect can only be perceived in retrospect.
Milestone

Comments

@PaulRBerg
Copy link
Member

PaulRBerg commented Sep 22, 2023

Spec

This opcode mints amount tokens with sub-identifier sub_id to the provided recipient.

Input

  • recipient of type Address
  • sub_id of type B256
  • amount of type U256

Output

  • None

Receipt

  • New receipt of type Mint
  • Data
    • token_id of type U256
    • sub_id of type B256
    • Minted amount of type U256
    • New recipient balance of type U256 (maybe?)

Errors

None.

Notes

  • Only contracts can call MINT
  • The sub_id passed to MINT will be used to generate the token ID. More concretely, the token ID will be KECCAK256(concat(contract_address,sub_id)).

References

@PaulRBerg PaulRBerg mentioned this issue Sep 22, 2023
7 tasks
@PaulRBerg PaulRBerg added effort: epic Multi-stage task that may require multiple PRs. work: complex Probe-sense-respond. The relationship between cause and effect can only be perceived in retrospect. priority: 0 Do this first before everything else. This is critical and nothing works without this. type: feature New feature or request. and removed priority0 labels Jan 1, 2024
@IaroslavMazur IaroslavMazur self-assigned this Mar 2, 2024
@IaroslavMazur IaroslavMazur linked a pull request Mar 2, 2024 that will close this issue
@IaroslavMazur

This comment was marked as duplicate.

@PaulRBerg PaulRBerg added this to the Genesis milestone Apr 15, 2024
@PaulRBerg

This comment was marked as resolved.

@IaroslavMazur

This comment was marked as resolved.

@PaulRBerg

This comment was marked as resolved.

@PaulRBerg
Copy link
Member Author

Just a heads-up @IaroslavMazur that I updated this spec to include a recipient input.

This will lead to a better UX when developing SRF-20 contracts because users will not have to mint+relay tokens to users.

For more context, see my discussion with the Fuel team: https://forum.fuel.network/t/can-native-assets-be-minted-to-arbitrary-accounts/3108?u=prberg

@IaroslavMazur
Copy link
Member

I updated this spec to include a recipient input.

Implemented this bit today in the PR that has been transformed into #148

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
effort: epic Multi-stage task that may require multiple PRs. priority: 0 Do this first before everything else. This is critical and nothing works without this. type: feature New feature or request. work: complex Probe-sense-respond. The relationship between cause and effect can only be perceived in retrospect.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants