-
Notifications
You must be signed in to change notification settings - Fork 23
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
Erc20 components #23
Conversation
74d15a0
to
1051b41
Compare
681c93d
to
5f449f7
Compare
|
||
// Generate a starknet::interface from a sozo artifact abi | ||
|
||
const fs = require("fs"); |
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.
do we need this?
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 can move it or remove it
it can be convenient when composing multiple components to check exposed fns / generate interface
token/src/components/tests/token/erc20/test_erc20_allowance.cairo
Outdated
Show resolved
Hide resolved
token/src/components/tests/token/erc20/test_erc20_allowance.cairo
Outdated
Show resolved
Hide resolved
amount: u256 | ||
) { | ||
let current_allowance = self.get_allowance(owner, spender).amount; | ||
if current_allowance != BoundedInt::max() { |
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.
kinda dumb that we have this in starknet with multicall
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.
owner allowance get consumed when an allowed spender transfer_from owner
This reverts commit 7fc1c7f.
740198a
to
b9ebe4f
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.
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.
WIP