Comments (2)
I see where you are coming from but this can be solved within the contract itself rather by changing the create2deployer
contract. The only purpose of the create2deployer
is to execute CREATE2
deployments and not to conduct further actions. Whatever you want to do can be achieved via constructor arguments. So for the owner
<>msg.sender
problem you can for instance do the following:
contract mainContract is Ownable {
constructor(address owner) {
_transferOwnership(owner);
}
...
}
This will lead to 2 events emitted during the contract creation transaction (the first owner will be transferred to msg.sender
and the second thereafter to the set address in the main constructor). The reason why this can be done is due to the linearization pattern of multiple inheritance in Solidity (see here).
For the AccessControl
control case it would look like this:
contract mainContract is AccessControl {
constructor(address admin) {
_grantRole(DEFAULT_ADMIN_ROLE, admin);
}
...
}
from create2deployer.
Thanks for your comment!
from create2deployer.
Related Issues (15)
- Feature Request: Add Further Testnet Deployments HOT 6
- Add Polygon zkEVM Testnet HOT 1
- Solidity Version `0.8.20` HOT 1
- 🥹 Base Mainnet Deployment HOT 1
- Add Manta Testnet and Subsequent Mainnet HOT 2
- ♻️ Implement Hardhat Toolbox
- 💥 Add Arbitrum Sepolia Deployment
- 💥 Add Shardeum Betanet Deployment HOT 2
- Dependency Dashboard
- Migration Optimism testnet (from Kovan to Goerli) HOT 1
- Add further networks
- CI: Implement CodeSpell HOT 1
- Update Heco info links HOT 1
- Enforcing front-running prevention HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from create2deployer.