argentlabs / argent-x

ArgentX browser extension for StarkNet - made with ❤️ by Argent
https://github.com/argentlabs/argent-x
Other
625 stars 276 forks source link

Use a custom account contract #474

Closed microbecode closed 1 year ago

microbecode commented 2 years ago

How could I use a custom account contract with ArgentX?

dhruvkelawala commented 2 years ago

Hey, this is available in the latest versions of ArgentX. You should declare your custom account contract to starknet and then you can go to Settings > Manage Network > Add ( + )

Here you can add the network which can be similar to Goerli for example and in advanced setting, you can put the declared AccountContract class hash. If you need more help with this, feel free to ask

microbecode commented 2 years ago

Thanks for the reply!

I'm sorry for being a bit vague originally. The question was not about "use custom account contract in a different network", but about a possibility to switch to use a different account contract in one network - without customizing custom networks for that. So one could switch used account contract for every transaction, for example.

Furthermore, I think the used account contract needs to adhere to ArgentX interfaces (with Guardians), am I correct? A more free-form account contract wouldn't be ok.

dhruvkelawala commented 2 years ago

Your custom network doesn't actually have to be "custom". Your network can be exactly same as Goerli or Mainnet. But adding a custom network is the only way that we currently support using a custom account contract.

dhruvkelawala commented 1 year ago

Does this make sense?

microbecode commented 1 year ago

Well, yes, it makes sense but it's not what I'm looking for :) It wouldn't be feasible to switch between a few different account contracts for different transactions you want to make. Not really user-friendly. And there's also the issue that the account contract needs to have the Argent-specific Guardian logic, I assume.