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

Improve launchTestNode integration with typegen contract factories #2708

Open
nedsalk opened this issue Jul 5, 2024 · 0 comments
Open

Improve launchTestNode integration with typegen contract factories #2708

nedsalk opened this issue Jul 5, 2024 · 0 comments
Labels
blocked Something is blocking development on this issue feat Issue is a feature

Comments

@nedsalk
Copy link
Contributor

nedsalk commented Jul 5, 2024

Once #2707 goes through, the interface of launchTestNode can be simplified:

import { launchTestNode } from 'fuels/test-utils';
import { CallTestContractAbi__factory } from '../test/typegen/contracts';

const {
    contracts: [contract],
    cleanup,
  } = await launchTestNode({
    contractsConfigs: [ 
      CallTestContractAbi__factory, 
      { factory: CallTestContractAbi__factory, options: { storageSlots: {}, ... } }
    ],
  });

The contractsConfigs can now accept a factory directly without having to specify the bytecode field

contractConfigs: [ CallTestContractAbi__factory ]

but there can still be flexibility for when users want to use DeployContractOptions via the options property:

contractConfigs: [ { factory: CallTestContractAbi__factory, options: { storageSlots: {}, ... } } ]

@nedsalk nedsalk added feat Issue is a feature blocked Something is blocking development on this issue labels Jul 5, 2024
@nedsalk nedsalk changed the title Improve launchTestNode contract factory integration Improve launchTestNode integration with typegen contract factories Jul 5, 2024
@danielbate danielbate added the p2 label Jul 12, 2024
@danielbate danielbate added this to the 0.x post-launch milestone Jul 12, 2024
@arboleya arboleya removed this from the 0.x post-launch milestone Jul 19, 2024
@arboleya arboleya removed the p2 label Aug 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked Something is blocking development on this issue feat Issue is a feature
Projects
None yet
Development

No branches or pull requests

3 participants