Skip to content

v0.95.0

Compare
Choose a tag to compare
@fuel-service-user fuel-service-user released this 10 Oct 21:30
· 100 commits to master since this release
ffd3d6c

Summary

In this release, we:

  • Added new checksum utility to the Address class
  • Added Provider methods isUserAccount and getAddressType which indicate the type of the hex passed
  • Added a new header for GraphQL requests with the fuels version used
  • Added a limit of 30 transactions to the provider.getTransactions() method.
  • fixed an issue where formatting with 0 in the bn class returned an incorrect value
  • Fixed caching of chain and node data in Provider.
  • Fixed typegen template for ContractFactory
  • Updated to [email protected]
  • Updated to [email protected]
  • Updated create-fuels toolchain file
  • Updated to [email protected]
  • Made Address.toString and Address.valueOf returns the Address checksum
  • Updated fuel-core to 0.38.0
  • Optimised the provider balance queries
  • Optimize the getBlockWithTransactions query

Breaking


Features

Fixes

Chores


Migration Notes

Features

#3306 - Bump transaction pagination limit to 60

  • A limit was added of 60 transactions to the provider.getTransactions() method.

Chores

#3310 - Made Address toString and valueOf returns checksum

The return of both Address.toString() and Address.valueOf was modified to return the address checksum instead of the Bech32 string

// before
const address = new Address('fuel1elnmzsav56dqnp95sx4e2pckq36cvae9ser44m5zlvgtwxw49fmqd7e42e');

address.toString()
// fuel1elnmzsav56dqnp95sx4e2pckq36cvae9ser44m5zlvgtwxw49fmqd7e42e

address.valueOf()
// fuel1elnmzsav56dqnp95sx4e2pckq36cvae9ser44m5zlvgtwxw49fmqd7e42e
// after
const address = new Address('fuel1elnmzsav56dqnp95sx4e2pckq36cvae9ser44m5zlvgtwxw49fmqd7e42e');

address.toString()
// 0xEf86aFa9696Cf0dc6385e2C407A6e159A1103cEfB7E2Ae0636FB33d3cb2A9E4A

address.valueOf()
// 0xEf86aFa9696Cf0dc6385e2C407A6e159A1103cEfB7E2Ae0636FB33d3cb2A9E4A

#3286 - Slim down chainInfoFragment and GasCostsFragment

  • latestBlock is no longer part of the ChainInfo return of provider.getChain(). You can fetch it via provider.getBlock('latest').
  • ChainInfo['consensusParameters']['gasCosts'] has been slimmed down to only contain data necessary for the operation of the SDK. Up until now, the SDK was fetching more than it needed. If this change affects you, you will have to create a custom graphql query for gasCosts for the additional data you need.

#3296 - Optimize balance queries

  • Removed the owner and assetId properties from the response of Provider.operations.getBalance(). These properties are also required arguments to execute the function so are redundant in the response. Should you require these values, you should take them from the values that you passed to the function.
  • Removed the owner property from the response of Provider.operations.getBalances(). This property is a required argument to execute the function so is redundant in the response. Should you require this value, you should take it from the value that you passed to the function.