Giter VIP home page Giter VIP logo

create3's People

Contributors

agusx1211 avatar k06a avatar wschwab avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

create3's Issues

Code produces different addresses and I dont know why

Hey Guys,

I am very excited about CREATE3 (thanks for sharing this !!!) and have tried to apply it in our context but I cant manage to produce same contract addresses across different networks.

I have a contract "CrossChainBridgeRouter" (which I want to deploy with same addresses) and in the same .sol-file I have another helper contract with this code:

`contract RouterDeployer {
bytes private salt = bytes('ThisIsMySalt');

function deployRouter() external returns (address) {
return Create3.create3(keccak256(salt), type(CrossChainBridgeRouter).creationCode);
}
}`

and then I have a deploy script that deploys the helper contract and calls the deploy function.
But when I do that in various networks, it produces different addresses and I dont know why. The deployer wallet is the same, the salt is fixed and the contract code doesnt change either. So where is the variation coming from?

This is my deploy script:

` console.log("Deploying from address: ", deployer.address);
console.log("Deploying helper contract that has CREATE3 deployer function...");
const RouterDeployer = await hre.ethers.getContractFactory('RouterDeployer');
const routerDeployer = await RouterDeployer.deploy();
await routerDeployer.deployed();

console.log("Now deploying actual router contract using CREATE3...");
const routerDeployedAt = await routerDeployer.callStatic.deployRouter();
console.log(routerDeployedAt);`

Do you have an idea what I am missing or doing wrong?

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.