starknet-io / starknet.js

JavaScript library for StarkNet
https://www.starknetjs.com
MIT License
1.21k stars 764 forks source link

Upgraded Braavos account do not work in starknet.js #990

Open PhilippeR26 opened 6 months ago

PhilippeR26 commented 6 months ago

Describe the bug In the past, the ArgentX and Braavos account contract where both with a proxy. It means that there where :

When you upgrade an old ArgentX account, the proxy contract is replaced by a Cairo 1 account contract, so no more proxy. When you upgrade an old Braavos account, the Cairo 0 implementation class is replaced by a Cairo 1 account contract. So, you have still a Cairo 0 proxy, with a Cairo 1 implementation. When Starknet.js is trying to identify the Cairo version of a such account, it will check the contract at the account address, here the proxy. As the proxy is Cairo 0, Starknet.js concludes falsely that the account is Cairo 0 version. If you try to perform a transaction, you have as a result the classical error Input too long for arguments.

To Reproduce I have one account in Goerli Testnet in this situation : addr : 0x06b7d99f2621f1fb2d3263d7a085de5d5f40751c6d1055a0a6c8105038fd44d2

Expected behavior I have identified 2 solutions :

Screenshots N/A

Desktop (please complete the following information):

Additional context Add any other context about the problem here.

PhilippeR26 commented 6 months ago

Waiting a decision for the strategy to adopt...

Jemiiah commented 4 months ago

@PhilippeR26 is this work assignable?

PhilippeR26 commented 4 months ago

Hello, In fact, I am handling this one from start to finish.