Skip to content

Releases: FuelLabs/fuels-ts

v0.94.7

27 Sep 09:23
e6f6965
Compare
Choose a tag to compare

Summary

In this release, we:

  • Upgraded fuel-core to v0.36.0
  • Upgraded forc to v0.63.6 and v0.64.0
  • Added support for SRC-14 proxy contracts in fuels deploy
  • Removed assets from sepolia / testnet network
  • Fixed decimals of some assets on fuel network side
  • Added flag to indicate whether a connector is external
  • Added a banner for users running an outdated fuels version
  • Fixed the usage of fuel-toolchain.toml for fuels templates

Features

Fixes

Chores

v0.94.6

13 Sep 15:18
53c137c
Compare
Choose a tag to compare

Summary

In this release, we:

  • Implemented TransactionUpgrade and TransactionUpload
  • The provider.url now returns an authenticated URL
  • The Provider now accepts a headers field
  • Added UI tests to the create fuels template app
  • Fixed coder matching for some namespaced libraries
  • Fixed issue with storage slots not being auto-loaded when deploying a contract
  • Add Ethereum asset on mainnet to the list of assets (Ethereum network side)
  • Deprecated the two network URLs, added asset ID and chain ID for mainnet
  • Fixed transactions failing when using Ethereum and Solana connectors in the create-fuels template app
  • Added new supported assets based on the points program
  • Removed signTransaction method from FuelConnectorMethods enum
  • The selectNetwork connector method now accepts either url or chainId or both.

Features

Fixes

Chores

v0.94.5

06 Sep 22:41
b063c6c
Compare
Choose a tag to compare

Summary

In this release, we:

  • Reduced number of requests for submitting a transaction
  • Fixed squeezed-out transactions not being notified to users
  • Fixed an issue where you couldn't call a loader contract via a proxy contract
  • Fixed error handling in Provider for when a node is offline
  • Deprecate all receipt coders
  • Upgraded forc to v0.63.4
  • Upgraded forc to v0.63.5

Features

  • #3101 - Use submitAndAwaitStatus to submit transactions, by @nedsalk

Fixes

Chores

v0.94.4

04 Sep 17:30
2caf1b1
Compare
Choose a tag to compare

Summary

In this release, we:

  • We now return a deep clone of the transaction request in the static from method
  • Reduced the cost of submitting blob contract deploys where a blob has already been uploaded
  • Made vite the default template for create-fuels
  • Mapped the 'not enough coins' error to a readable error message
  • Added support for URLs with BasicAuth credentials in Provider
  • Fixed TX estimation when an InputMessage contains data
  • Deprecate the method BaseTransactionRequest.fundWithFakeUtxos
  • Upgraded fuel-core to v0.35.0
  • Deprecated the error code HASHER_LOCKED
  • Fixed revert error message assembling

Features

Fixes

Chores

v0.94.3

30 Aug 19:21
d19736b
Compare
Choose a tag to compare

Summary

In this release, we:

  • Added future-proofing to fail gracefully for different transaction types which may exist later on.
  • Added Solana connector to create-fuels template app
  • Added an embedded testnet faucet into the create-fuels template app
  • Made the create-fuels template app mobile-friendly
  • Upgraded to forc v0.63.3

Features

Fixes

Chores

v0.94.2

28 Aug 19:25
72026e6
Compare
Choose a tag to compare

Summary

In this release, we:

  • Fixed a potential race condition where the fuel connector may disconnect upon re-render
  • Introduced an init method for synchronous instantiation of a fuel-connectors object
  • Upgraded fuel-core to v0.34.0

Fixes

Chores

v0.94.1

22 Aug 14:03
2ddc35a
Compare
Choose a tag to compare

Summary

In this release, we:

  • Added a Vite template to create-fuels
  • Improved browser compatibility for typegen'd bytecode compression

Features

Fixes

Chores

v0.94.0

20 Aug 00:38
d64db24
Compare
Choose a tag to compare

Summary

In this release, we:

  • Cached Message resources upon transaction submission
  • Made typegen API more straightforward and ergonomic
  • Reduced required roundtrips & bandwidth for submitting TXs
  • Made ContractFactory.deployAsBlobTx a non-blocking call
  • Upgraded forc to v0.63.0 & v0.63.1
  • Added support for the new ABI spec (#596, #599)
  • Improved the bytecode compression for Typegen, making files 40%+ smaller
  • Improved the type handling for () and Option<T> types
  • Upgraded fuel-core to v0.32.1
  • Implemented deploying large contracts using blob transactions
  • Fixed forc and fuel-core version reporting on typegen-generated files
  • Fixed getInputFromAssetId so it returns the correct InputCoin and InputMessage
  • Upgraded fuel-core to v0.33.0
  • Added createAssetId function to create a native AssetId type
  • Added validation for max. input limit exceeded, as per the consensus parameters
  • Removed FUEL_NETWORK_URL and LOCAL_NETWORK_URL constants
  • Removed generateTestWallet, seedTestWallet and launchNodeAndGetWallets utilities
  • Renamed testing class AssetId to TestAssetId

Breaking


Features

Fixes

Chores


Migration Notes

Features

#2872 - Consider message on resources cache

The provider option flag cacheUtxo was renamed to resourceCacheTTL

// before
const provider = await Provider.create(FUEL_NETWORK_URL, {
  cacheUtxo: 5000,
});


using launched = await launchTestNode({
  providerOptions: {
    cacheUtxo: 5000,
  },
});
// after
const provider = await Provider.create(FUEL_NETWORK_URL, {
  resourceCacheTTL: 5000,
});

using launched = await launchTestNode({
  providerOptions: {
    resourceCacheTTL: 5000,
  },
});

#2824 - Prettify typegen api

Predicate class

  • Predicate class constructor parameters renamed: inputData > data
// before
import { Predicate } from 'fuels';

const predicate = new Predicate({
  ...unchangedParameters,
  inputData,
});
// after
import { Predicate } from 'fuels';

const predicate = new Predicate({
  ...unchangedParameters,
  data,
});
  • Typegen extended/generated Predicate now accepts a single parameter for initialization
// before
import { TestPredicateAbi__factory } from './typegend';

TestPredicateAbi__factory.createInstance(provider, data, configurableConstants);
// after
import { TestPredicate } from './typegen';

new TestPredicate({
  provider,
  data,
  configurableConstants
});

launchTestNode utility

  • Renamed contractsConfigs[].deployer to contractsConfigs[].factory
  • Removed contractsConfigs[].bytecode and .hex.ts file

The bytecode is now saved within the factory class, so you don't have to deal with it.

// before
import { TokenAbi__factory } from './typegend';
import TokenAbiHex from './typegend/contracts/TokenAbi.hex';

using launched = await launchTestNode({
  contractsConfigs: [{
    deployer: TokenAbi__factory,
    bytecode: TokenAbiHex
  }],
});
// after
import { TokenFactory } from './typegend';

using launched = await launchTestNode({
  contractsConfigs: [{
    factory: TokenFactory,
  }],
})

Renamed method deployContract to deploy

Removed the redundant suffix on the ContractFactory class method name.

// before
import { ContractFactory } from 'fuels';

const factory = new ContractFactory(wallet);

factory.deployContract();
// after
import { ContractFactory } from 'fuels';

const factory = new ContractFactory(wallet);

factory.deploy();

Typegen Contract template

  • Removed Abi__factory suffix from class names
  • The file <name>.hex was removed (access it via <Name>.bytecode)
  • The files <name>__factory.ts and <name>.d.dts were merged into <name>.ts
  • The class <Name> and the interface <Name>Abi are now just <Name>
  • Method <Name>Factory.deployContract() renamed to <Name>Factory.deploy()
  • You may need to remove the previously generated <typegenDir>/contracts/factories directory
// before
import { TestContractAbi, TestContract__factory } from './typegen'
import testContractBytecode from './typegen/contracts/TestContract.hex'

const instance = await TestContract__factory.connect(id, wallet);

const deploy = await TestContract__factory.deployContract(testContractBytecode, wallet);
const { c...
Read more

v0.93.0

30 Jul 14:20
bd1cbd9
Compare
Choose a tag to compare

Summary

In this release, we:

  • Limited deployment to contracts up to 100kb
  • Remove the awaitExecution flag and its associated functionality
  • Upgraded forc to v0.62.0
  • Refactored getTransactionCost method for Provider and Account
  • Expanded our documentation for connectors

Breaking


Features

Fixes

Chores

Docs


Migration Notes

Features

#2796 - Deploy contract validation

ErrorCode.INVALID_TRANSACTION_TYPE was migrated to ErrorCode.UNSUPPORTED_TRANSACTION_TYPE.

// before
const code = ErrorCode.INVALID_TRANSACTION_TYPE;
// after
const code = ErrorCode.UNSUPPORTED_TRANSACTION_TYPE;

Chores

#2820 - Remove awaitExecution functionality

It is no longer possible to submit transactions using the awaitExecution flag and wait for the transaction to be processed at submission:

// before
const response = await account.sendTransaction(transactionRequest, { awaitExecution: true }); 
// after
const submit = await account.sendTransaction(transactionRequest);

const response = await submit.waitForResult();

#2643 - Refactored the getTransactionCost method

Refactored functionality for Provider.getTransactionCost to Account.getTransactionCost and changed estimation parameter from quantitiesToContract to quantities.

// before
const provider = Provider.create(...);
const account = Wallet.generate({ ... }) || new Predicate(...);
const quantities: Array<CoinQuantityLike> = [
  { amount: 1000, assetId: provider.getBaseAssetId() }
];

const cost = provider.getTransactionCost(txRequest, {
  resourceOwner: account,
  quantitiesToContract: quantities,
})
// after
const provider = Provider.create(...);
const account = Wallet.generate({ ... }) || new Predicate(...);
const quantities: Array<CoinQuantityLike> = [
  { amount: 1000, assetId: provider.getBaseAssetId() }
];

const cost = account.getTransactionCost(txRequest, { quantities });

v0.92.1

18 Jul 13:33
d9d0573
Compare
Choose a tag to compare

Features

Fixes

  • #2756 - launchTestNode multiple contracts type inference, by @nedsalk

Chores

  • #2752 - Replace create-fuels hardcoded values with constants, by @Dhaiwat10