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

feat!: making provider initialization sync again #3514

Merged
merged 36 commits into from
Jan 6, 2025
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
1095ef5
Relief at last
arboleya Dec 27, 2024
857c592
Disabling side-effects warning for docs
arboleya Dec 28, 2024
b46d8ae
What was that?
arboleya Dec 28, 2024
73e6ba4
Rolling back original method as deprecated
arboleya Jan 1, 2025
fab02a1
DRY doc's snippets
arboleya Jan 1, 2025
daf858b
Adding changeset
arboleya Jan 1, 2025
6c7a394
Removing test exclusivity
arboleya Jan 1, 2025
c689561
Fixing test assertion
arboleya Jan 1, 2025
2fdc392
Update apps/docs/src/guide/predicates/snippets/cookbook/transferring-…
arboleya Jan 1, 2025
72ddab1
Update apps/docs/src/guide/transactions/snippets/transaction.ts
arboleya Jan 1, 2025
073f864
Update apps/docs/src/guide/predicates/snippets/cookbook/transferring-…
arboleya Jan 1, 2025
bdbb1a9
Update packages/fuel-gauge/src/transaction-summary.test.ts
arboleya Jan 1, 2025
b3f76a0
Update packages/fuel-gauge/src/transaction-summary.test.ts
arboleya Jan 1, 2025
83cef54
Update packages/account/src/account.ts
arboleya Jan 1, 2025
9ef9907
Update packages/program/src/functions/base-invocation-scope.ts
arboleya Jan 1, 2025
c77301f
Update .changeset/old-laws-film.md
arboleya Jan 1, 2025
5d96eb6
Fixing type
arboleya Jan 1, 2025
a951687
Removing obsolete test
arboleya Jan 1, 2025
ca6f05f
Adding missing declaration
arboleya Jan 1, 2025
cde60c3
Refactoring messy method
arboleya Jan 2, 2025
878ad8f
Update packages/account/src/providers/provider.ts
arboleya Jan 2, 2025
4b12dfd
Adjusting changeset - PR introduces breaking changes
arboleya Jan 2, 2025
987b76c
Merge branch 'master' into aa/feat/sync-provider-init
arboleya Jan 2, 2025
e3aedae
Revert "Update packages/account/src/providers/provider.ts"
arboleya Jan 2, 2025
3053a49
Revert "Refactoring messy method"
arboleya Jan 2, 2025
706d6b4
Fixing changeset, it's a minor bump now
arboleya Jan 2, 2025
0a71af8
Update .changeset/old-laws-film.md
arboleya Jan 2, 2025
ff4d75a
Merge branch 'master' into aa/feat/sync-provider-init
arboleya Jan 2, 2025
1340f16
Merge branch 'master' into aa/feat/sync-provider-init
arboleya Jan 2, 2025
3bb5b78
Merge branch 'master' into aa/feat/sync-provider-init
arboleya Jan 2, 2025
7c97708
Fixing remaining problematic parts
arboleya Jan 2, 2025
36de628
Fixing broken tests
arboleya Jan 2, 2025
6655e1d
Merge branch 'master' into aa/feat/sync-provider-init
arboleya Jan 2, 2025
f9c85c2
Merge branch 'master' into aa/feat/sync-provider-init
arboleya Jan 6, 2025
1cf6aa5
chore: fixing broken test
petertonysmith94 Jan 6, 2025
5632de7
Merge branch 'master' into aa/feat/sync-provider-init
petertonysmith94 Jan 6, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .changeset/old-laws-film.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
"@fuel-ts/contract": patch
"@fuel-ts/account": patch
"@fuel-ts/program": patch
"@fuel-ts/recipes": patch
"@fuel-ts/script": patch
"fuels": patch
arboleya marked this conversation as resolved.
Show resolved Hide resolved
---

feat: make `provider` initialization `sync` again
2 changes: 1 addition & 1 deletion apps/create-fuels-counter-guide/src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const queryClient = new QueryClient();

const connectors = defaultConnectors({
devMode: true,
burnerWalletConfig: { fuelProvider: Provider.create(providerUrl) },
burnerWalletConfig: { fuelProvider: new Provider(providerUrl) },
});

createRoot(document.getElementById("root")!).render(
Expand Down
4 changes: 2 additions & 2 deletions apps/demo-typegen/src/demo.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -169,11 +169,11 @@ test('Example predicate', async () => {
data: predicateData,
});

const tx = await wallet.transfer(predicate.address, 200_000, provider.getBaseAssetId());
const tx = await wallet.transfer(predicate.address, 200_000, await provider.getBaseAssetId());
const { isStatusSuccess } = await tx.wait();

// Then we are transferring some coins from the predicate to a random address (receiver)
const tx2 = await predicate.transfer(receiver.address, 50_000, provider.getBaseAssetId());
const tx2 = await predicate.transfer(receiver.address, 50_000, await provider.getBaseAssetId());
await tx2.wait();

expect((await receiver.getBalance()).toNumber()).toEqual(50_000);
Expand Down
1 change: 1 addition & 0 deletions apps/docs/.eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ module.exports = {
extends: ["../../.eslintrc.js"],
rules: {
"no-console": "off",
"no-new": "off",
"tsdoc/syntax": "off",
},
};
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Provider, Wallet } from 'fuels';
import { LOCAL_NETWORK_URL, WALLET_PVT_KEY } from '../../../../env';
import { ReturnContextFactory } from '../../../../typegend';

const provider = await Provider.create(LOCAL_NETWORK_URL);
const provider = new Provider(LOCAL_NETWORK_URL);
const wallet = Wallet.fromPrivateKey(WALLET_PVT_KEY, provider);

const deploy = await ReturnContextFactory.deploy(wallet);
Expand All @@ -15,7 +15,7 @@ const amountToForward = 10;
const { waitForResult } = await contract.functions
.return_context_amount()
.callParams({
forward: [amountToForward, provider.getBaseAssetId()],
forward: [amountToForward, await provider.getBaseAssetId()],
})
.call();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Provider, Wallet } from 'fuels';
import { LOCAL_NETWORK_URL, WALLET_PVT_KEY } from '../../../../env';
import { ReturnContextFactory } from '../../../../typegend';

const provider = await Provider.create(LOCAL_NETWORK_URL);
const provider = new Provider(LOCAL_NETWORK_URL);
const wallet = Wallet.fromPrivateKey(WALLET_PVT_KEY, provider);

const deploy = await ReturnContextFactory.deploy(wallet);
Expand All @@ -14,7 +14,7 @@ try {
await contract.functions
.return_context_amount()
.callParams({
forward: [10, provider.getBaseAssetId()],
forward: [10, await provider.getBaseAssetId()],
gasLimit: 1,
})
.call();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Provider, Wallet } from 'fuels';
import { LOCAL_NETWORK_URL, WALLET_PVT_KEY } from '../../../../env';
import { ReturnContextFactory } from '../../../../typegend';

const provider = await Provider.create(LOCAL_NETWORK_URL);
const provider = new Provider(LOCAL_NETWORK_URL);
const wallet = Wallet.fromPrivateKey(WALLET_PVT_KEY, provider);

const deploy = await ReturnContextFactory.deploy(wallet);
Expand All @@ -16,7 +16,7 @@ const transactionGasLimit = 100_000;
const call = await contract.functions
.return_context_amount()
.callParams({
forward: [10, provider.getBaseAssetId()],
forward: [10, await provider.getBaseAssetId()],
gasLimit: contractCallGasLimit,
})
.txParams({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Provider, Wallet } from 'fuels';
import { LOCAL_NETWORK_URL, WALLET_PVT_KEY } from '../../../env';
import { EchoConfigurablesFactory } from '../../../typegend';

const provider = await Provider.create(LOCAL_NETWORK_URL);
const provider = new Provider(LOCAL_NETWORK_URL);
const wallet = Wallet.fromPrivateKey(WALLET_PVT_KEY, provider);

// #region setting-configurable-constant
Expand Down
4 changes: 2 additions & 2 deletions apps/docs/src/guide/contracts/snippets/contract-balance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ import { Provider, Wallet } from 'fuels';
import { LOCAL_NETWORK_URL, WALLET_PVT_KEY } from '../../../env';
import { TransferToAddressFactory } from '../../../typegend';

const provider = await Provider.create(LOCAL_NETWORK_URL);
const provider = new Provider(LOCAL_NETWORK_URL);
const wallet = Wallet.fromPrivateKey(WALLET_PVT_KEY, provider);
const { waitForResult: waitForDeploy } =
await TransferToAddressFactory.deploy(wallet);
const { contract } = await waitForDeploy();

const amountToForward = 40;
const amountToTransfer = 10;
const baseAssetId = provider.getBaseAssetId();
const baseAssetId = await provider.getBaseAssetId();

const recipient = Wallet.generate({
provider,
Expand Down
10 changes: 6 additions & 4 deletions apps/docs/src/guide/contracts/snippets/cost-estimation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ import { Provider, Wallet } from 'fuels';
import { LOCAL_NETWORK_URL, WALLET_PVT_KEY } from '../../../env';
import { ReturnContextFactory } from '../../../typegend';

const provider = await Provider.create(LOCAL_NETWORK_URL);
const provider = new Provider(LOCAL_NETWORK_URL);
const baseAssetId = await provider.getBaseAssetId();

const wallet = Wallet.fromPrivateKey(WALLET_PVT_KEY, provider);

const deploy = await ReturnContextFactory.deploy(wallet);
Expand All @@ -13,7 +15,7 @@ const { contract } = await deploy.waitForResult();
const cost = await contract.functions
.return_context_amount()
.callParams({
forward: [100, provider.getBaseAssetId()],
forward: [100, baseAssetId],
})
.getTransactionCost();

Expand All @@ -23,10 +25,10 @@ console.log('costs', cost);
// #region cost-estimation-2
const scope = contract.multiCall([
contract.functions.return_context_amount().callParams({
forward: [100, provider.getBaseAssetId()],
forward: [100, baseAssetId],
}),
contract.functions.return_context_amount().callParams({
forward: [300, provider.getBaseAssetId()],
forward: [300, baseAssetId],
}),
]);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Provider, Wallet } from 'fuels';
import { LOCAL_NETWORK_URL, WALLET_PVT_KEY } from '../../../../env';
import { MyContractFactory } from '../../../../typegend';

const provider = await Provider.create(LOCAL_NETWORK_URL);
const provider = new Provider(LOCAL_NETWORK_URL);
const wallet = Wallet.fromPrivateKey(WALLET_PVT_KEY, provider);
const factory = new MyContractFactory(wallet);
// #endregion setup
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ import { Provider } from 'fuels';

import { LOCAL_NETWORK_URL } from '../../../../env';

const provider = await Provider.create(LOCAL_NETWORK_URL);
const provider = new Provider(LOCAL_NETWORK_URL);

const {
consensusParameters: {
contractParameters: { contractMaxSize },
},
} = provider.getChain();
} = await provider.getChain();
// #endregion full

console.log('contractMaxSize', contractMaxSize);
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Provider, Wallet } from 'fuels';
import { LOCAL_NETWORK_URL, WALLET_PVT_KEY } from '../../../env';
import { SimpleTokenFactory, TokenDepositorFactory } from '../../../typegend';

const provider = await Provider.create(LOCAL_NETWORK_URL);
const provider = new Provider(LOCAL_NETWORK_URL);
const wallet = Wallet.fromPrivateKey(WALLET_PVT_KEY, provider);

const { waitForResult: waitForSimpleToken } =
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/src/guide/contracts/snippets/introduction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Provider, Wallet } from 'fuels';
import { LOCAL_NETWORK_URL, WALLET_PVT_KEY } from '../../../env';
import { EchoValuesFactory } from '../../../typegend';

const provider = await Provider.create(LOCAL_NETWORK_URL);
const provider = new Provider(LOCAL_NETWORK_URL);
const wallet = Wallet.fromPrivateKey(WALLET_PVT_KEY, provider);

const deploy = await EchoValuesFactory.deploy(wallet);
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/src/guide/contracts/snippets/logs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { Provider, Wallet } from 'fuels';
import { LOCAL_NETWORK_URL, WALLET_PVT_KEY } from '../../../env';
import { LogValuesFactory } from '../../../typegend';

const provider = await Provider.create(LOCAL_NETWORK_URL);
const provider = new Provider(LOCAL_NETWORK_URL);
const wallet = Wallet.fromPrivateKey(WALLET_PVT_KEY, provider);

const deploy = await LogValuesFactory.deploy(wallet);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Contract, Provider, Wallet } from 'fuels';
import { LOCAL_NETWORK_URL, WALLET_PVT_KEY } from '../../../env';
import { EchoValues, EchoValuesFactory } from '../../../typegend';

const provider = await Provider.create(LOCAL_NETWORK_URL);
const provider = new Provider(LOCAL_NETWORK_URL);
const wallet = Wallet.fromPrivateKey(WALLET_PVT_KEY, provider);
const abi = EchoValues.abi;
const { waitForResult, contractId } = await EchoValuesFactory.deploy(wallet);
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/src/guide/contracts/snippets/methods/call.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Provider, Wallet } from 'fuels';
import { LOCAL_NETWORK_URL, WALLET_PVT_KEY } from '../../../../env';
import { CounterFactory } from '../../../../typegend';

const provider = await Provider.create(LOCAL_NETWORK_URL);
const provider = new Provider(LOCAL_NETWORK_URL);
const deployer = Wallet.fromPrivateKey(WALLET_PVT_KEY, provider);

const deployContract = await CounterFactory.deploy(deployer);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Provider, Wallet } from 'fuels';
import { LOCAL_NETWORK_URL, WALLET_PVT_KEY } from '../../../../env';
import { CounterFactory } from '../../../../typegend';

const provider = await Provider.create(LOCAL_NETWORK_URL);
const provider = new Provider(LOCAL_NETWORK_URL);
const deployer = Wallet.fromPrivateKey(WALLET_PVT_KEY, provider);

const deployContract = await CounterFactory.deploy(deployer);
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/src/guide/contracts/snippets/methods/get.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Provider, Wallet } from 'fuels';
import { LOCAL_NETWORK_URL, WALLET_PVT_KEY } from '../../../../env';
import { CounterFactory } from '../../../../typegend';

const provider = await Provider.create(LOCAL_NETWORK_URL);
const provider = new Provider(LOCAL_NETWORK_URL);
const deployer = Wallet.fromPrivateKey(WALLET_PVT_KEY, provider);

const deployContract = await CounterFactory.deploy(deployer);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Provider, Wallet } from 'fuels';
import { LOCAL_NETWORK_URL, WALLET_PVT_KEY } from '../../../../env';
import { CounterFactory } from '../../../../typegend';

const provider = await Provider.create(LOCAL_NETWORK_URL);
const provider = new Provider(LOCAL_NETWORK_URL);
const deployer = Wallet.fromPrivateKey(WALLET_PVT_KEY, provider);

const deployContract = await CounterFactory.deploy(deployer);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Provider, Wallet } from 'fuels';
import { LOCAL_NETWORK_URL, WALLET_PVT_KEY } from '../../../../env';
import { CounterFactory } from '../../../../typegend';

const provider = await Provider.create(LOCAL_NETWORK_URL);
const provider = new Provider(LOCAL_NETWORK_URL);
const deployer = Wallet.fromPrivateKey(WALLET_PVT_KEY, provider);

const deployContract = await CounterFactory.deploy(deployer);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Provider, Wallet } from 'fuels';
import { LOCAL_NETWORK_URL, WALLET_PVT_KEY } from '../../../../env';
import { EchoValuesFactory, ReturnContextFactory } from '../../../../typegend';

const provider = await Provider.create(LOCAL_NETWORK_URL);
const provider = new Provider(LOCAL_NETWORK_URL);
const deployer = Wallet.fromPrivateKey(WALLET_PVT_KEY, provider);

const echoContractTx = await EchoValuesFactory.deploy(deployer);
Expand All @@ -17,7 +17,7 @@ const { waitForResult } = await echoContract
.multiCall([
echoContract.functions.echo_u8(10),
returnContextContract.functions.return_context_amount().callParams({
forward: [100, provider.getBaseAssetId()],
forward: [100, await provider.getBaseAssetId()],
}),
])
.call();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Provider, Wallet } from 'fuels';
import { LOCAL_NETWORK_URL, WALLET_PVT_KEY } from '../../../../env';
import { CounterFactory, EchoValuesFactory } from '../../../../typegend';

const provider = await Provider.create(LOCAL_NETWORK_URL);
const provider = new Provider(LOCAL_NETWORK_URL);
const deployer = Wallet.fromPrivateKey(WALLET_PVT_KEY, provider);

const counterContractTx = await CounterFactory.deploy(deployer);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Provider, Wallet } from 'fuels';
import { LOCAL_NETWORK_URL, WALLET_PVT_KEY } from '../../../../env';
import { CounterFactory, EchoValuesFactory } from '../../../../typegend';

const provider = await Provider.create(LOCAL_NETWORK_URL);
const provider = new Provider(LOCAL_NETWORK_URL);
const deployer = Wallet.fromPrivateKey(WALLET_PVT_KEY, provider);

const counterContractTx = await CounterFactory.deploy(deployer);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Provider, Wallet } from 'fuels';
import { LOCAL_NETWORK_URL, WALLET_PVT_KEY } from '../../../../env';
import { CounterFactory } from '../../../../typegend';

const provider = await Provider.create(LOCAL_NETWORK_URL);
const provider = new Provider(LOCAL_NETWORK_URL);
const deployer = Wallet.fromPrivateKey(WALLET_PVT_KEY, provider);

const counterContractTx = await CounterFactory.deploy(deployer);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
CounterV2Factory,
} from '../../../typegend';

const provider = await Provider.create(LOCAL_NETWORK_URL);
const provider = new Provider(LOCAL_NETWORK_URL);
const wallet = Wallet.fromPrivateKey(WALLET_PVT_KEY, provider);

const counterContractFactory = new CounterFactory(wallet);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Provider, Wallet } from 'fuels';
import { LOCAL_NETWORK_URL, WALLET_PVT_KEY } from '../../../../env';
import { StorageTestContractFactory } from '../../../../typegend';

const provider = await Provider.create(LOCAL_NETWORK_URL);
const provider = new Provider(LOCAL_NETWORK_URL);
const deployer = Wallet.fromPrivateKey(WALLET_PVT_KEY, provider);

const deploymentTx = await StorageTestContractFactory.deploy(deployer, {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
StorageTestContractFactory,
} from '../../../../typegend';

const provider = await Provider.create(LOCAL_NETWORK_URL);
const provider = new Provider(LOCAL_NETWORK_URL);
const deployer = Wallet.fromPrivateKey(WALLET_PVT_KEY, provider);

const deploymentTx = await StorageTestContractFactory.deploy(deployer, {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { ASSET_A, ASSET_B } from 'fuels/test-utils';
import { LOCAL_NETWORK_URL, WALLET_PVT_KEY } from '../../../../env';
import { EchoValuesFactory } from '../../../../typegend';

const provider = await Provider.create(LOCAL_NETWORK_URL);
const provider = new Provider(LOCAL_NETWORK_URL);
const deployer = Wallet.fromPrivateKey(WALLET_PVT_KEY, provider);

const deployContract = await EchoValuesFactory.deploy(deployer);
Expand All @@ -19,7 +19,7 @@ const transferParams: TransferParams[] = [
{
destination: recipient1.address,
amount: 100,
assetId: provider.getBaseAssetId(),
assetId: await provider.getBaseAssetId(),
},
{ destination: recipient1.address, amount: 400, assetId: ASSET_A },
{ destination: recipient2.address, amount: 300, assetId: ASSET_B },
Expand All @@ -34,7 +34,7 @@ await waitForResult();
// #endregion add-transfer-2

const recipientBalanceBaseAsset = await recipient1.getBalance(
provider.getBaseAssetId()
await provider.getBaseAssetId()
);
const recipientBalanceAssetA = await recipient1.getBalance(ASSET_A);
const recipientBalanceAssetB = await recipient2.getBalance(ASSET_B);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Provider, Wallet } from 'fuels';
import { LOCAL_NETWORK_URL, WALLET_PVT_KEY } from '../../../../env';
import { EchoValuesFactory } from '../../../../typegend';

const provider = await Provider.create(LOCAL_NETWORK_URL);
const provider = new Provider(LOCAL_NETWORK_URL);
const deployer = Wallet.fromPrivateKey(WALLET_PVT_KEY, provider);

const deployContract = await EchoValuesFactory.deploy(deployer);
Expand All @@ -17,14 +17,16 @@ const { waitForResult } = await contract.functions
.addTransfer({
destination: recipient.address,
amount: 100,
assetId: provider.getBaseAssetId(),
assetId: await provider.getBaseAssetId(),
})
.call();

await waitForResult();
// #endregion add-transfer-1

const recipientBalance = await recipient.getBalance(provider.getBaseAssetId());
const recipientBalance = await recipient.getBalance(
await provider.getBaseAssetId()
);
console.log(
'Recipient balance should equal 100',
recipientBalance.toNumber() === 100
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { bn, getMintedAssetId, Provider, Wallet } from 'fuels';
import { LOCAL_NETWORK_URL, WALLET_PVT_KEY } from '../../../../env';
import { TokenFactory } from '../../../../typegend';

const provider = await Provider.create(LOCAL_NETWORK_URL);
const provider = new Provider(LOCAL_NETWORK_URL);
const deployer = Wallet.fromPrivateKey(WALLET_PVT_KEY, provider);

const deployContract = await TokenFactory.deploy(deployer);
Expand Down
Loading
Loading