Coder Social home page Coder Social logo

Comments (4)

JeffWScott avatar JeffWScott commented on September 3, 2024

It's not supposed to work like that, it's a security feature.

LInked accounts tie a smart contract to a url to an account in the user's wallet. Which ultimately allows a site to send transactions on the user's behalf (if auto TX is enabled). I do not want the website to change the smart contract willy nilly because then they can just start sending transactions all over the place.

However, I could allow this for testnet connections, to make development easier. I generally develop my smart contract separately from the site. Buy the time I get to makeing the website the contract is created and tested in pyCham already.

Once you take your app to mainnet I would not expect you would be changing smart contract name.

I appreciate the issue, I'll keep this open because I am generally curious how other developers view this topic.

from wallet.

shoutcool avatar shoutcool commented on September 3, 2024

It would not be possible to change the smart contract without noticing the user, because he would have to create a new account and also call the approve method again to interact with the new contract.

Can you maybe explain how a webapp can change the contract (e.g because of a major bug)? because at the moment the whole webapp would be stuck, and the user wont notice anything, but every transaction would fail.

from wallet.

JeffWScott avatar JeffWScott commented on September 3, 2024

As with any app it think that responsibility lands on the developer.

I would think that you would communicate to your users on URL_v1 that there was a bug and direct their users to url_v2 which is linked to a new smart contract.

Then you would need to direct them on how to migrate from contract v1 to contract v2 and that would include instructions on how to configure the wallet.

This is blockchain, and the stuff you create, as well as the ownership of those things, lasts forever. 'updating your contact" needs to be approached as "not an option" and as such great care and testing should be taken when releasing the final product.

from wallet.

shoutcool avatar shoutcool commented on September 3, 2024

The smart contracts are on the blockchain yes, but the corresponding Web Frontends are not. This situation would get even worse if you have to interact with multiple smart contracts (e.g. a complex game). This would lead to multiple UIs (with different URLs) wich have to be maintained because each UI interacts with different versions of the smart contract. I highly doubt this is a good design decision.

Adding support to change the contract version on the same URL does not impact the security (as the user will have to confirm everything again). It just makes it much more complex for developers and end-users to handle this use case.

I appreciate the open discussion 👍

from wallet.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.