Skip to content

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

Description

@zguesmi

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).

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions