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

Contract base class and ERC20 class implementations #60

Merged
merged 14 commits into from Nov 22, 2022

Conversation

ptisserand
Copy link
Collaborator

#46

In order to add ERC20 class, I have done the following:

  • moved felt.dart to types folder
  • added uint256.dart implementation in types folder
  • added contract.dart and erc20.dart implementations in contract folder.

Please note that only ERC20 view methods are currently implemented

Copy link
Collaborator

@gabsn gabsn left a comment

Choose a reason for hiding this comment

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

Very great work!

provider: provider,
signer: signer,
accountAddress: accountAddress,
chainId: StarknetChainId.testNet);
Copy link
Collaborator

Choose a reason for hiding this comment

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

nice. I think we could even have factory functions like Account.Testnet to speed up the setup :)

final erc20 = ERC20(account: account, address: erc20Address);

Future<Uint256> account_balance(Felt account) async {
final balance = await erc20.balanceOf(account);
Copy link
Collaborator

Choose a reason for hiding this comment

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

woww

@ptisserand ptisserand merged commit ed03b05 into focustree:main Nov 22, 2022
@gabsn gabsn added the Paid label Dec 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants