NEWTON

NEWTON


Popular tags

    How do I develop against cairo devnet with browser wallets?

    Asked

    4 months ago

    10

    views


    0

    Howdy.

    I am trying to dev against the starknet devnet to build my frontend and am experiencing some issues. With argent, it seems that the version in the chromestore isn't up to date with the devnet's fee token, so I can create an account and fund it, but still not be able to do any transactions.

    When I try to build from source, I get an error about something involving a react server or something.

    Trying braavos, I am able to transact against dev net (invoke method calls) but calling views seems to be going against a wrongly set provider. So when I connect with the wallet, all my calls get an error that 'the contract isn't deployed' because it is checking against a goerli-testnet provider rather than my devnet. I can set a default provider manually, but it gets overwritten when I access the wallet.

    I am hoping that there is maybe a third wallet or something that can help me sidestep the concern. But perhaps my understanding of the situation is misguided. I am using starknet-react, if that maybe is contributing to the issue.

    

    This question was originally posted on Triality

      cairo-langcairo

    2 answers

    0

    How are you setting the provider in starknet-react? From their docs, you can set the default provider to point to your local node when wrapping your app component with <StarknetProvider>, for example:

    function App() {

    return (

    <StarknetProvider defaultProvider={new Provider({ baseUrl: 'http://localhost:5050' })}>

    <YourApp />

    </StarknetProvider>

    )

    }

    This answer was originally posted on Triality

    answered

    5 months ago

    0

    There is currently a video walkthrough solution of the triality team building an app using starknet.js and starknet-react on youtube: https://www.youtube.com/watch?v=bttBpU-7eS4.

    Check the source code for the project by cloning the following from github: https://github.com/trialityorg/starknet-house-session and see if you can run the app and connect all the hooks up correctly. All the contract demo is done on Goerli after running through all the Pytests, so you may have a config issue using devnet but you can follow the steps on Goerli and also test there. They were able to interact as seen in the video with both ArgentX wallet and Braavos so shouldnt be an issue with wallets in that regard. For specific devnet issues, I would reccommend providing a good amount of information here as the fix may be a multistep process. Also, feel free to reach out on Twitter DM's to the Triality team!

    This answer was originally posted on Triality

    answered

    5 months ago

    Your answer

    NEWTON

    NEWTON