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

Send transaction cost to factory deployer only if its balance is empty #94

Open
zguesmi opened this issue Jul 9, 2024 · 0 comments
Open
Assignees

Comments

@zguesmi
Copy link
Member

zguesmi commented Jul 9, 2024

in FactoryDeployer.js script, the factory deployer account is funded with some tokens to allow the deployment of the factory.

console.debug(`→ Factory is not yet deployed on this network`);
await waitTx(
wallet.sendTransaction({ to: FACTORY.deployer, value: FACTORY.cost }),
);
await waitTx(wallet.provider.sendTransaction(FACTORY.tx));
console.debug(`→ Factory successfully deployed`);

With the current version, if the factory deployment tx fails funds are sent with every retry, which results in loosing funds of the sender account.

We need to add a control to only send funds if the deployer account is empty (or less than FACTORY.cost).

@zguesmi zguesmi self-assigned this Jul 9, 2024
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

1 participant