Giter VIP home page Giter VIP logo

Comments (4)

frangio avatar frangio commented on July 18, 2024

A question to ask is whether each role should have its own constructor argument, or if we add just one argument and reuse it for all roles. A third option could be to add one argument for the admin and a separate argument for all other roles.

If the address passed in is zero, the role shouldn't be granted.

from contracts-wizard.

ericglau avatar ericglau commented on July 18, 2024

This should also apply for owner if using Ownable.

from contracts-wizard.

SKYBITDev3 avatar SKYBITDev3 commented on July 18, 2024

This issue is important because if the contract is deployed using CREATE2 or via the "CREATE3" method, msg.sender's value is the address of the factory contract or a temporary proxy contract, instead of the expected account initiating the deployment. Then the factory contract ends up owning the deployed contract and receiving initially minted tokens (that then may be stuck forever).

from contracts-wizard.

SKYBITDev3 avatar SKYBITDev3 commented on July 18, 2024

tx.origin gives the expected value but Vitalik said it shouldn't be relied upon.

from contracts-wizard.

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.