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()