You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be interesting to implement this for predicates and scripts to enable some automations. Currently,onDeploy is executed after contracts are deployed.
* Deploy contract and save their IDs to JSON file.
*/
constcontractIds=awaitdeployContracts(config);
awaitsaveContractIds(contractIds,config.output);
config.onDeploy?.(config,contractIds);
My suggestion would be to implement something like this:
exportasyncfunctiondeploy(config: FuelsConfig){/** * Deploy contract and save their IDs to JSON file. */constcontractIds=awaitdeployContracts(config);awaitsaveContractIds(contractIds,config.output);/** * Deploy scripts and save deployed files to disk. */constscripts=awaitdeployScripts(config);saveScriptFiles(scripts,config);/** * Deploy predicates and save deployed files to disk. */constpredicates=awaitdeployPredicates(config);savePredicateFiles(predicates,config);config.onDeploy?.(config,{
scripts,
predicates,contracts: contractIds,});/** * After deploying scripts/predicates, we need to * re-generate factory classe with the loader coee */awaitgenerateTypes(config);returncontractIds;}
The text was updated successfully, but these errors were encountered:
It would be interesting to implement this for predicates and scripts to enable some automations. Currently,
onDeploy
is executed after contracts are deployed.fuels-ts/packages/fuels/src/cli/commands/deploy/index.ts
Lines 11 to 18 in 88d7535
My suggestion would be to implement something like this:
The text was updated successfully, but these errors were encountered: