Coder Social home page Coder Social logo

Comments (7)

mds1 avatar mds1 commented on June 30, 2024

You'll have to place the Multicall3 bytecode at the specified address manually, since you can't deploy it without the deployer's private key. I'm not sure of the specifics of your chain, but something like anvil, hardhat, or tenderly all support this

from multicall.

noyyyy avatar noyyyy commented on June 30, 2024

You'll have to place the Multicall3 bytecode at the specified address manually, since you can't deploy it without the deployer's private key. I'm not sure of the specifics of your chain, but something like anvil, hardhat, or tenderly all support this

Got it. Suppose a tool contract is deployed with the create2 factory. Different developers can deploy it with the same address and don't have to control the same private key. For Multicall3, I have to get another address on a private chain.

from multicall.

mds1 avatar mds1 commented on June 30, 2024

A create2 factory wasn't used here because there is no create2 factory at the same address on 50+ chains. So you still have the same problem of getting that create2 factory at the same address on each chain, including your private chain

from multicall.

noyyyy avatar noyyyy commented on June 30, 2024

A create2 factory wasn't used here because there is no create2 factory at the same address on 50+ chains. So you still have the same problem of getting that create2 factory at the same address on each chain, including your private chain

It doesn't matter if the create2 factory address is the same. Once the input args of create2 are deterministic(mainly contract bytes code), the outcome address will be the same.

from multicall.

mds1 avatar mds1 commented on June 30, 2024

It doesn't matter if the create2 factory address is the same. Once the input args of create2 are deterministic(mainly contract bytes code), the outcome address will be the same.

This is incorrect, the deployer address (the create2 factory) is a factor in the resulting contract address. From EIP-1014:

Behaves identically to CREATE (0xf0), except using keccak256( 0xff ++ address ++ salt ++ keccak256(init_code))[12:] instead of the usual sender-and-nonce-hash as the address where the contract is initialized at.

Where address is the address of the contract using the CREATE2 opcode 🙂

from multicall.

noyyyy avatar noyyyy commented on June 30, 2024

It doesn't matter if the create2 factory address is the same. Once the input args of create2 are deterministic(mainly contract bytes code), the outcome address will be the same.

This is incorrect, the deployer address (the create2 factory) is a factor in the resulting contract address. From EIP-1014:

Behaves identically to CREATE (0xf0), except using keccak256( 0xff ++ address ++ salt ++ keccak256(init_code))[12:] instead of the usual sender-and-nonce-hash as the address where the contract is initialized at.

Where address is the address of the contract using the CREATE2 opcode 🙂

Sorry, I misunderstood the create2🥲. Thanks for your correction.

from multicall.

mds1 avatar mds1 commented on June 30, 2024

No worries, will close this now 👌

from multicall.

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.