FuelLabs / fuels-ts

Fuel Network Typescript SDK
https://docs.fuel.network/docs/fuels-ts/
Apache License 2.0
44.04k stars 1.35k forks source link

Move script and predicate blob deployment logic away from `ContractFactory` #3361

Open nedsalk opened 2 weeks ago

nedsalk commented 2 weeks ago

The predicate and script blob deployment logic currently lives in ContractFactory.deployAsBlobTxForScript. We should move it out of there and into a function that can then be used in e.g. new Predicate(...).deployAsBlob() and new Script(...).deployAsBlob(). This deployAsBlob method can then return a new Predicate/Script instance with the updated bytecode and abi.

arboleya commented 1 week ago

Perhaps the method could be called deploy.

maschad commented 1 week ago

Related to https://github.com/FuelLabs/fuels-ts/issues/2917