Releases: FuelLabs/fuels-ts
v0.94.3
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
- #3003 - Added support for unknown txn types, by @maschad
- #3013 - Add missing connectors to
create fuels
template, by @Dhaiwat10 - #3036 - Embed testnet faucet in
create-fuels
template, by @Dhaiwat10 - #3011 - Make
create-fuels
template app responsive, by @Dhaiwat10
Fixes
- #3062 - Remove
u64
fromNumberCoderType
, by @bajpai244 - #3064 -
UtxoIdCoder
output index to beu16
, by @danielbate
Chores
- #3055 - Upgraded forc to
0.63.3
, by @petertonysmith94
v0.94.2
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
- #2930 - Avoid potential race-condition in fuel connectors init, by @maschad
- #3040 - Consistent typegen outputs, by @petertonysmith94
- #3041 - Added missing dependencies for templates, by @petertonysmith94
- #3044 - UI integration tests, by @petertonysmith94
Chores
- #2999 - Upgrade
[email protected]
, by @Torres-ssf - #3012 - Upgrade connectors, by @danielbate
- #3020 - Made
chainConfig
files match testnet configuration, by @Torres-ssf
v0.94.1
Summary
In this release, we:
- Added a Vite template to
create-fuels
- Improved browser compatibility for typegen'd bytecode compression
Features
- #2942 - Add vite template to
create-fuels
, by @Dhaiwat10
Fixes
- #2985 - Made bytecode compression browser compatible, by @petertonysmith94
- #2990 - Stop building
typegen
onpretest
script, by @arboleya
Chores
- #3005 - Make
nextjs
the defaultcreate fuels
template, by @danielbate
v0.94.0
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
()
andOption<T>
types - Upgraded
fuel-core
to v0.32.1 - Implemented deploying large contracts using blob transactions
- Fixed
forc
andfuel-core
version reporting on typegen-generated files - Fixed
getInputFromAssetId
so it returns the correctInputCoin
andInputMessage
- Upgraded
fuel-core
to v0.33.0 - Added
createAssetId
function to create a nativeAssetId
type - Added validation for max. input limit exceeded, as per the consensus parameters
- Removed
FUEL_NETWORK_URL
andLOCAL_NETWORK_URL
constants - Removed
generateTestWallet
,seedTestWallet
andlaunchNodeAndGetWallets
utilities - Renamed testing class
AssetId
toTestAssetId
Breaking
- Features
- #2872 - Consider message on resources cache, by @Torres-ssf
- #2824 - Prettify
typegen
api, by @arboleya - #2962 - Read malleable fields from transaction status on subscription, by @nedsalk
- #2929 - Non-blocking blob deployment, by @danielbate
- #2856 - Adding
abi
transpiler, by @arboleya - #2777 - Improve
()
andOption<T>
type handling, by @petertonysmith94 - #2827 -
[email protected]
and large contract deployments, by @danielbate
- Fixes
- #2963 - Assembly process for account transfer operation, by @Torres-ssf
- Chores
- #2915 - Deprecate
FUEL_NETWORK_URL
andLOCAL_NETWORK_URL
, by @petertonysmith94 - #2811 - Integrate
launchTestNode
in remaining packages, by @maschad - #2964 - Wrap subscriptions in promise, by @nedsalk
- #2905 - Renamed
AssetId
toTestAssetId
, by @petertonysmith94
- #2915 - Deprecate
Features
- #2897 - Improve typegen bytecode compression, by @Dhaiwat10
- #2903 - Add randomUUID into
fuel-ts/crypto
, by @Torres-ssf
Fixes
- #2888 - Typegen reporting the correct versions, by @petertonysmith94
- #2982 - Avoid re-add fake resources at
Account.getTransactionCost
, by @Torres-ssf - #2896 - Transaction revert error, by @petertonysmith94
- #2981 - Gas price estimation test flakiness, by @nedsalk
- #2926 -
Account.createTransfer
return type, by @Torres-ssf - #2859 - Typegen generic configurables, by @nedsalk
- #2782 - Return correct operations from coin and message inputs, by @maschad
Chores
- #2839 - Refactor helpers related to transaction operations, by @maschad
- #2978 - Upgrade
[email protected]
, by @danielbate - #2665 - Implement a helper createAssetId function, by @bolajahmad
- #2822 - Handle exceeding maximum inputs when funding a transaction, by @mvares
- #2925 - Improve node incompatibility warning, by @Torres-ssf
- #2891 - Default TestMessage to be spendable, by @Torres-ssf
- #2883 - Dependencies version consistency, by @petertonysmith94
- #2879 - Switching
Error
toFuelError
, by @petertonysmith94 - #2890 - Add missing reasons to
PANIC_REASONS
constant, by @Torres-ssf - #2899 - Add validation for TX max outputs exceeded, by @Torres-ssf
- #2851 - Add infra to support multiple
create fuels
templates, by @Dhaiwat10
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
tocontractsConfigs[].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...
v0.93.0
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 forProvider
andAccount
- Expanded our documentation for connectors
Breaking
- Features
- #2796 - Deploy contract validation, by @danielbate
- Chores
- #2820 - Remove
awaitExecution
functionality, by @Torres-ssf - #2643 - Refactored the
getTransactionCost
method, by @petertonysmith94
- #2820 - Remove
Features
- #2755 - Add testing to
create-fuels
, by @danielbate
Fixes
- #2853 - Add back
create fuels
template metadata, by @Dhaiwat10 - #2815 - Make properties of configurables optional in typegen, by @Torres-ssf
- #2843 - Export interfaces in typegen, by @DefiCake
Chores
- #2798 - Handle
create fuels
template scenarios for insufficient funds, by @Dhaiwat10 - #2579 - Integrate
launchTestNode
into current test suites, by @maschad - #2794 - Upgrading
forc
to0.62.0
, by @arboleya
Docs
- #2772 - Add more comments around the
create-fuels
template app, by @Dhaiwat10 - #2786 - Added connector documentation, by @petertonysmith94
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
Features
- #2762 - Add minified
fuels
distribution, by @petertonysmith94
Fixes
Chores
- #2752 - Replace
create-fuels
hardcoded values with constants, by @Dhaiwat10
v0.92.0
Summary
In this release, we:
- Made the contract's
call
method a non-blocking call - Made the contract's
deployContract
method a non-blocking call - Added pagination support to
Provider
andAccount
classes - Added support for multiple new connectors in the
create fuels
template - Upgraded
fuel-core
to v0.31.0 - Upgraded
sway
/forc
to v0.61.2
Breaking
- Features
- #2692 - Implement non-blocking contract call, by @Torres-ssf
- #2597 - Made
deployContract
a non-blocking call, by @Torres-ssf - #2408 - Implement pagination for
Account
methods, by @Torres-ssf
- Fixes
- Chores
- #2652 - Remove
InvocationResult
fromprogram
package, by @Torres-ssf
- #2652 - Remove
Features
- #2749 - Utilize the Next.js
Link
component, by @petertonysmith94
Fixes
Chores
- #2691 - Include all supported connectors in the create fuels template, by @Dhaiwat10
- #2739 - Fix repetitive words, by @petertonysmith94
- #2717 - Upgrading
fuel-core
to0.31.0
, by @arboleya - #2743 - Mimic
JsonAbi
interface fromabi-coder
inabi-typegen
, by @nedsalk - #2693 - Upgrading
forc
to0.61.2
, by @arboleya
Migration Notes
Features
#2692 - Implement non-blocking contract call
The call
method in the BaseInvocationScope
class no longer waits for transaction execution, making it non-blocking. This change affects how transaction responses are handled.
// before
const { logs, value, transactionResult } = await contract.functions.xyz().call()
// after
const { transactionId, waitForResult } = await contract.functions.xyz().call();
const { logs, value, transactionResult } = await waitForResult();
#2597 - Made deployContract
a non-blocking call
The deployContract
method no longer returns the contract instance directly. Instead, it returns an object containing the transactionId
, the contractId
, and a waitForResult
function.
// before
const factory = new ContractFactory(contractByteCode, contractAbi, wallet);
const contract = await factory.deployContract();
const { value } = await contract.functions.xyz().call();
// after
const factory = new ContractFactory(contractByteCode, contractAbi, wallet);
const { waitForResult, transactionId, contractId } = await factory.deployContract();
const { contract, transactionResult } = await waitForResult();
const { value } = await contract.functions.xyz().call();
#2408 - Implement pagination for Account
methods
// before
const coins = await myWallet.getCoins(baseAssetId);
const messages = await myWallet.getMessages();
const balances = await myWallet.getBalances();
const blocks = await provider.getBlocks();
// after
const { coins, pageInfo } = await myWallet.getCoins(baseAssetId);
const { messages, pageInfo } = await myWallet.getMessages();
const { balances } = await myWallet.getBalances();
const { blocks, pageInfo } = await provider.getBlocks();
/*
The `pageInfo` object contains cursor pagination information one
can use to fetch subsequent pages selectively and on demand.
*/
Fixes
#2718 - launchNode.cleanup
not killing node in last test of test group
The killNode
and KillNodeParams
functionality has been internalized and the method and interface have been deleted so they're no longer exported. It's marked as a breaking change for pedantic reasons and there shouldn't really be any affected users given that they kill nodes via cleanup
which is unchanged, so no migration notes are necessary.
Chores
#2652 - Remove InvocationResult
from program
package
The classes FunctionInvocationResult
, InvocationCallResult
, and InvocationResult
have been removed. This change will not affect most users as the response for a contract call or script call remains the same; only the type name has changed.
// before
const callResult: FunctionInvocationResult = await contract.functions.xyz().call()
const dryRunResult: InvocationCallResult = await contract.functions.xyz().get()
const dryRunResult: InvocationCallResult = await contract.functions.xyz().dryRun()
const dryRunResult: InvocationCallResult = await contract.functions.xyz().simulate()
// after
const callResult: FunctionResult = await contract.functions.xyz().call()
const dryRunResult: DryRunResult = await contract.functions.xyz().get()
const dryRunResult: DryRunResult = await contract.functions.xyz().dryRun()
const dryRunResult: DryRunResult = await contract.functions.xyz().simulate()
v0.91.0
Summary
In this release, we:
- Upgraded to
sway
/forc
@ v0.61.1 - Added support for
str
slices - Updated
create fuels
template and added afuel-toolchain.toml
file to it - Made
create fuels
CLI easier to use with fewer options and smarter defaults - Improved tooling around
fuels
config file, allowing for selective event listening
Breaking
- Features
- #2433 - Separate
onSuccess
events for the Fuels CLI, by @Dhaiwat10
- #2433 - Separate
- Fixes
- Chores
- #2620 - Upgrade
commander
to12.1.0
, by @YaTut1901
- #2620 - Upgrade
Features
- #2619 - Add
fuel-toolchain.toml
tocreate fuels
template, by @danielbate - #2647 - Add next link component to
create-fuels
, by @mvares - #2580 - Migrate to NextJS app router, by @YaTut1901
Fixes
- #2563 - Passing arguments with NPM, by @petertonysmith94
- #2564 - Added docs for
isReadOnly
function, by @petertonysmith94 - #2626 - Sync chain config schema, by @petertonysmith94
Chores
- #2637 - Export test and cli utilities in
fuels
umbrella package, by @nedsalk - #2489 - Add integration test for
create fuels
, by @petertonysmith94 - #2444 - Remove some choices from
create-fuels
CLI, by @Dhaiwat10 - #2622 - Add browser testing infrastructure, by @danielbate
- #2690 - Triggerable
devnet
e2e tests, by @danielbate - #2562 - Add
UNKNOWN
error code, by @maschad - #2366 - Add debug logger for fuel-ts ecosystem, by @maschad
- #2685 - Support
[email protected]
, by @danielbate
Docs
- #2198 - Merge error related pages, by @petertonysmith94
v0.90.0
Breaking
- Features
- #1356 - Add
launchTestNode
utility, by @nedsalk - #2485 - Remove redundant exports from
v1
encoding, by @danielbate
- #1356 - Add
- Fixes
- #2432 - Updated chain assets, removed
beta-5
network, by @petertonysmith94
- #2432 - Updated chain assets, removed
- Chores
- #2491 - Upgrade fuel core to
0.28.0
, by @petertonysmith94 - #2502 - Rename Provider
call
todryRun
, by @Torres-ssf
- #2491 - Upgrade fuel core to
Features
- #2351 - Implement
generateFakeResources
onAccount
class, by @Torres-ssf - #2501 - Support mixed native and non-native enums, by @danielbate
- #2350 - Support for
bun
, by @petertonysmith94
Fixes
- #2551 - Validate empty
Vec
encoded length, by @danielbate - #2520 - Stop overring user input
maxFee
atdeployContract
method, by @Torres-ssf - #2548 - Type declarations for
@fuel-ts/account/test-utils
, by @petertonysmith94 - #2516 -
create-fuels
balance refresh, by @petertonysmith94 - #2542 - Flaky faucet test, by @petertonysmith94
Chores
- #2441 - Show all create-fuels template balances in ETH, by @Dhaiwat10
- #2505 - Add test to validate mint transactions serialization, by @Torres-ssf
- #2524 - Add version detection to
create fuels
, by @petertonysmith94 - #2525 - Upgrading
fuel-core
to0.29.0
, by @arboleya - #2537 - Upgrading
fuel-core
to0.30.0
, by @arboleya - #2486 - Validate incorrect case key for
EnumCoder
, by @petertonysmith94
Docs
- #2405 - Document the SDKs approach to encoding, by @danielbate
v0.89.2
Fixes
- #2430 - Update testnet URL, by @petertonysmith94
Chores
- #2210 - Re-enable connectors, bump dependencies, by @Dhaiwat10