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).
in
FactoryDeployer.jsscript, the factory deployer account is funded with some tokens to allow the deployment of the factory.PoCo/utils/FactoryDeployer.js
Lines 26 to 31 in 8dc9ea3
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).