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

chore: implement a helper createAssetId function #2665

Merged
merged 14 commits into from
Aug 8, 2024

Conversation

bolajahmad
Copy link
Contributor

@bolajahmad bolajahmad commented Jun 30, 2024

Release notes

In this release, we:

  • Added createAssetId function to create a native AssetId type

Summary

This PR implements the helper createAssetId, which will receive as parameters a contract ID and a sub-asset ID and will return the Sway native parameter AssetId

Checklist

  • I addedtests to prove my changes
  • I updated — all the necessary docs
  • I reviewed — the entire PR myself, using the GitHub UI
  • I described — all breaking changes and the Migration Guide

@CLAassistant
Copy link

CLAassistant commented Jun 30, 2024

CLA assistant check
All committers have signed the CLA.

@bolajahmad bolajahmad marked this pull request as draft June 30, 2024 23:53
@petertonysmith94 petertonysmith94 added the feat Issue is a feature label Jul 1, 2024
@bolajahmad bolajahmad marked this pull request as ready for review July 1, 2024 19:46
@maschad maschad marked this pull request as draft July 1, 2024 19:52
@maschad maschad marked this pull request as ready for review July 1, 2024 19:52
Copy link
Member

@danielbate danielbate left a comment

Choose a reason for hiding this comment

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

Hi @bolajahmad, thankyou for the contribution!

I've suggested some structural changes that'll bring this more inline with the SDK.

You also need to add a changeset (run pnpm changeset on the root directory) which will need a patch change for the transactions package.

Please also make your PR title more complete, as it is no longer in draft. I'd also suggest the following title:

feat: add createAssetId utility function

Be sure to add the PR title exactly to the changeset. Let us know if you need any additional support.

apps/docs/src/guide/types/native-parameters.md Outdated Show resolved Hide resolved
packages/transactions/src/coders/receipt.ts Outdated Show resolved Hide resolved
apps/docs/src/guide/types/native-parameters.md Outdated Show resolved Hide resolved
packages/transactions/src/coders/receipt.ts Outdated Show resolved Hide resolved
@bolajahmad bolajahmad changed the title draft: included a new createAssetId fn in receipt; added documentation chore: implement a helper createAssetId function Jul 2, 2024
@github-actions github-actions bot added the chore Issue is a chore label Jul 2, 2024
@bolajahmad bolajahmad force-pushed the create-assetid-helper-fn branch from cbb898c to 075ef73 Compare July 2, 2024 14:23
Copy link
Contributor

@Torres-ssf Torres-ssf left a comment

Choose a reason for hiding this comment

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

@bolajahmad It seems the issue #2646 was closed by @matt-user.

But we can use the opportunity to improve this Doc page.

apps/docs/src/guide/contracts/minted-token-asset-id.md Outdated Show resolved Hide resolved
apps/docs/src/guide/contracts/minted-token-asset-id.md Outdated Show resolved Hide resolved
@bolajahmad bolajahmad force-pushed the create-assetid-helper-fn branch from ba6dbc4 to 9a24fdc Compare July 3, 2024 13:01
Torres-ssf
Torres-ssf previously approved these changes Jul 3, 2024
@Torres-ssf Torres-ssf requested a review from danielbate July 3, 2024 17:48
Copy link
Member

@danielbate danielbate left a comment

Choose a reason for hiding this comment

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

One thought on the snippet

@danielbate
Copy link
Member

Please add AssetId to apps/docs/spell-check-custom-words.txt. It'll fix one of the CI stages.

@Torres-ssf Torres-ssf marked this pull request as draft July 5, 2024 19:51
@bolajahmad bolajahmad marked this pull request as ready for review July 6, 2024 19:40
@arboleya arboleya removed this from the 0.x post-launch milestone Jul 19, 2024
@petertonysmith94 petertonysmith94 enabled auto-merge (squash) August 8, 2024 10:55
@petertonysmith94 petertonysmith94 merged commit 84dfdc5 into FuelLabs:master Aug 8, 2024
28 of 30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Issue is a chore feat Issue is a feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants