Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The software hangs indefinitely without any information about what's happening #11

Open
Magicking opened this issue May 23, 2024 · 2 comments

Comments

@Magicking
Copy link

Description of the issue

When trying to submit a proposal through the OZ Foundry upgrade plugin, forge hangs indefinitely trying to deploy a contract, after looking over what was being executed it seems, that it hangs with the defender-deploy-client-cli as shown in the screenshot below
image

Code used for upgradeProposal

// solhint-disable-next-line no-console
contract Upgrade0000 is Script {
    function run() public {
        Options memory opts;
        // Set a Random salt
        opts.defender.salt = bytes32(uint256(0x12345678)); // abritrary salt
        ProposeUpgradeResponse memory response = Defender.proposeUpgrade(
            0xXXXX, "RegistryAccess.sol", opts
        );
        console.log("Proposal id", response.proposalId);
        console.log("Url", response.url);
    }
}

Setup

-> foundry.toml updated according to upgrades requirement
-> .env updated with Defender Key, secret and network ("sepolia")

Command run

forge clean && forge script Upgrade0000 --rpc-url https://ethereum-sepolia.publicnode.com -vvv

@Magicking
Copy link
Author

Trying to run that manually it shows this:
image
...

@ericglau
Copy link
Member

Thanks for reporting this.

If your deployment environment for that network is configured in Defender to deploy using a Relayer, it should deploy without hanging.

If your deployment environment is using an EOA or Safe to deploy, then see this note in the docs:

If using an EOA or Safe to deploy, you must submit the pending deployments in Defender while the script is running. The script waits for each deployment to complete before it continues.

As you observed, the Foundry plugin does not give any indication that it is waiting, and unfortunately I'm not aware of any way for it to print a message to indicate this. If we use console.log in Forge scripts to attempt to print a status message, the message is not visible to the user until after the script completes (which it won't in this scenario!). If you have any suggestions on how this could be improved, I'd be happy to consider.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants