Skip to content

[General] Can not deploy a contract from another contract #97

Closed Answered by Romsters
waynehoover asked this question in Deployments
Discussion options

You must be logged in to vote

Hi @waynehoover. I downloaded your code and added a simple function to QuestFactoryBase.sol:

function create1155Quest2(
        string memory questId_
    ) external payable nonReentrant returns (address) {
        address payable newQuest = payable(deploy1155Quest(erc1155QuestAddress, questId_));
        return newQuest;
    }

This one simply creates a contract within a contract. I changed nothing else and deployed it to zkSync Era testnet.
Transaction with calling this function was successfull and created a contract: https://goerli.explorer.zksync.io/tx/0x42a5163eba67e5c89090411a278da422f59d2d18fd2319081c94c04dc9470f74#eventlog.

Replies: 5 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@Romsters
Comment options

@Romsters
Comment options

Answer selected by MexicanAce

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deployment Questions for deployment
6 participants