v0.95.0
fuel-service-user
released this
10 Oct 21:30
·
100 commits
to master
since this release
Summary
In this release, we:
- Added new
checksum
utility to theAddress
class - Added Provider methods
isUserAccount
andgetAddressType
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 thebn
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
andAddress.valueOf
returns the Address checksum - Updated
fuel-core
to0.38.0
- Optimised the provider balance queries
- Optimize the
getBlockWithTransactions
query
Breaking
- Features
- #3306 - Bump transaction pagination limit to 60, by @danielbate
- Chores
- #3310 - Made Address
toString
andvalueOf
returns checksum, by @Torres-ssf - #3286 - Slim down
chainInfoFragment
andGasCostsFragment
, by @nedsalk - #3296 - Optimize balance queries, by @danielbate
- #3310 - Made Address
Features
- #3308 - Add checksum utils for address, by @luizstacio
- #3307 - Add feature to check if hex is an account, by @maschad
- #3282 - Add source request header, by @danielbate
- #3304 - Add pagination limit to
getTransactions
, by @petertonysmith94
Fixes
- #3300 - Correct
bn
formatting bug with 0 units, by @maschad - #3278 - Provider cache, by @Torres-ssf
- #3274 - Typegen factory template, by @arboleya
Chores
- #3265 -
[email protected]
,[email protected]
, andcreate-fuels
toolchains, by @danielbate - #3271 - Update to
[email protected]
, by @nedsalk - #3284 - Merge
chain
andnodeInfo
queries into one, by @nedsalk - #3272 - Update
fuel-core
to0.38.0
, by @Dhaiwat10 - #3309 - Optimize blockWithTransactions query, by @Torres-ssf
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 theChainInfo
return ofprovider.getChain()
. You can fetch it viaprovider.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 forgasCosts
for the additional data you need.
#3296 - Optimize balance queries
- Removed the
owner
andassetId
properties from the response ofProvider.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 ofProvider.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.