[General] Can not deploy a contract from another contract #97
-
EnvironmentTestnet Provide a brief description of the functionality you're trying to implement.I have solidity code that looks like this: I can't seem to narrow down the error, as it works for small trivial contracts. It could be because the contract size is too big, because I get a size error when compiling but not a deploy to zksync testnet works. What is the specific issue or error you're encountering?I can't deploy a contract from another contract. Here is a failed TX: https://goerli.explorer.zksync.io/tx/0x9130f38e5e167ee728adabe631d15e38c55b6fdabf02a015f68448bccb5a9429 Here is the code: Can you share the error messages or logs you're receiving, if any?
Have you made any recent changes to the contract before encountering this issue?no Are there any external libraries or contracts that your contract interacts with?no Can you provide the relevant portions of your contract code where the issue is occurring?Have you tried to isolate the problem, and if so, what were the results?Yes, it's isolated to deploying a contract from another contract, but only here. What steps have you already taken to try to resolve the issue?At first I thought it was related to this bug in the rust-sdk: matter-labs/zksync-era#27 but probably not. Repo Link (Optional)No response Additional DetailsNo response |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 2 replies
-
hey @waynehoover I've created a minimal example that deploys one contract from another in this repo. I'm able to deploy a contract from another and interact with them with no issues. Please check it out in case you're doing something different. |
Beta Was this translation helpful? Give feedback.
-
Thanks @uF4No. I was also able to create a simple contract that deploys another contract, but for some reason, it's not working with my repo, it could be that the contract size is too big. |
Beta Was this translation helpful? Give feedback.
Hi @waynehoover. I downloaded your code and added a simple function to
QuestFactoryBase.sol
: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.