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

Erc20 components #23

Merged
merged 22 commits into from
Jan 11, 2024
Merged

Erc20 components #23

merged 22 commits into from
Jan 11, 2024

Conversation

notV4l
Copy link
Collaborator

@notV4l notV4l commented Dec 4, 2023

WIP


// Generate a starknet::interface from a sozo artifact abi

const fs = require("fs");
Copy link
Contributor

Choose a reason for hiding this comment

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

do we need this?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

we can move it or remove it
it can be convenient when composing multiple components to check exposed fns / generate interface

amount: u256
) {
let current_allowance = self.get_allowance(owner, spender).amount;
if current_allowance != BoundedInt::max() {
Copy link
Contributor

Choose a reason for hiding this comment

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

kinda dumb that we have this in starknet with multicall

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

owner allowance get consumed when an allowed spender transfer_from owner

@ponderingdemocritus ponderingdemocritus marked this pull request as ready for review January 3, 2024 22:57
Copy link
Collaborator

@bal7hazar bal7hazar left a comment

Choose a reason for hiding this comment

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

Ok I am fine with the current version.

I am a bit worried about to have our own codebase regarding tokens instead of having dependency with OZ, but I don't see any other way to have it with the current Cairo limitations (no inheritance mechanism mainly).

So we will have to check sometimes the OZ repo to see if there are some hotfix and update our codebase accordingly.

Also I am wondering if we should have scripts in this repo vs. having them in dojo-starter examples instead.

@tarrencev tarrencev merged commit 38d0abf into dojoengine:main Jan 11, 2024
7 checks passed
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

Successfully merging this pull request may close these issues.

3 participants