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

Documentation uses module cardano/transaction/value #89

Closed
JustLeif opened this issue Nov 3, 2024 · 10 comments
Closed

Documentation uses module cardano/transaction/value #89

JustLeif opened this issue Nov 3, 2024 · 10 comments

Comments

@JustLeif
Copy link

JustLeif commented Nov 3, 2024

First

Thank you very much for your work on Aiken. It cannot be stated how much I appreciate you trying to make development on Cardano more approachable.

Describe what the problem is?

The documentation for the gift card example uses a module that doesn't appear in the newest version of the standard library.

Screenshot 2024-11-02 at 11 47 47 Screenshot 2024-11-02 at 11 47 36 Screenshot 2024-11-02 at 11 51 06

What should be the expected behavior?

I assume there is a new module or function that replaces the logic of the value.from_minted_value & value.tokens(policy_id)? I would offer a PR to fix this issue, but I'm very new to Cardano smart contract development and not sure if it is even an issue or maybe I made a mistake.

@FaizanShaikh-3033
Copy link
Contributor

Hello @JustLeif ,
yupp i was also facing the same issue.
In the new version of AIKEN we can use cardano/assets, and we can remove the line " value.from_minted_value ".
and also my PR is merged and the Gift Card example is now working good.
please check the doc of gift card again, Thank You.

@JustLeif
Copy link
Author

Hello @JustLeif , yupp i was also facing the same issue. In the new version of AIKEN we can use cardano/assets, and we can remove the line " value.from_minted_value ". and also my PR is merged and the Gift Card example is now working good. please check the doc of gift card again, Thank You.

Awesome thanks!

@speedlightwp
Copy link

Hi, when running the aiken check. I encountered the following error.

let Transaction { mint, inputs, .. } = transaction
· ─────┬─────
· ╰── unknown variable

Screenshot 2024-11-13 at 11 50 07 AM

@JustLeif
Copy link
Author

Hi, when running the aiken check. I encountered the following error.

let Transaction { mint, inputs, .. } = transaction · ─────┬───── · ╰── unknown variable
Screenshot 2024-11-13 at 11 50 07 AM

I believe that you are referencing the variable you defined as 'tx'. Try using this:

let Transaction { mint, inputs, .. } = tx

@speedlightwp
Copy link

I tried that too. This is the error:

Screenshot 2024-11-13 at 11 59 59 AM

@speedlightwp
Copy link

First time testing out Aiken. I guess the the website examples need further updates and testing.

@FaizanShaikh-3033
Copy link
Contributor

FaizanShaikh-3033 commented Nov 13, 2024

I tried that too. This is the error:

Screenshot 2024-11-13 at 11 59 59 AM

hello @speedlightwp thanks for bringing this up,
that should be like _d: Option<Data>
thanks for pointing out my mistake,
will solve it quickly

@JustLeif
Copy link
Author

I tried that too. This is the error:
Screenshot 2024-11-13 at 11 59 59 AM

For this error, change the type of Data to be:

_d: Option<Data>

instead of

_d: Data

I'm actually working on a course right now to write Aiken smart contracts and use them with the MeshSDK, the first project will be a demo bank. I can send you the videos when I'm done with them if you want :)

@speedlightwp
Copy link

Hi JustLeif, thank you. Do send me the videos once you have done. I am new to Aiken smart contracts, would like to learn more about it too.

@KtorZ
Copy link
Member

KtorZ commented Nov 13, 2024

Note: the gift_card tutorial is indeed lagging a bit behind. You can see the ongoing PR #96 updating it. We'll be wrapping this up in the upcoming days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants