Taquito v16.2.0
Potential Breaking Changes:
-
Some error classes may have been moved to the
@taquito/core
package. Note to developers if they are exporting any error classes to capture errors, there might be a need to adjust the export path. -
We have an ongoing error class refactoring which includes ticket #1992 (create an error class hierarchy), #1993 (consolidate duplicate errors in Taquito) and #1994 (improve error classes in individual packages, namely
@taquito/utils
,@taquito/local-forging
and@taquito/signer
). Here are a list of notable changes:@taquito/sapling
Class SaplingToolkit function prepareUnshieldedTransaction used to throw InvalidKeyError now throw a InvalidAddressError instead@taquito/rpc
when validateContractAddress used to throw InvalidAddressError will now throw InvalidContractAddressError.@taquito/sapling
prepareUnshieldedTransaction function when validateDestinationImplicitAddress used to throw InvalidAddressError now throw InvalidKeyHashError@taquito/local-forging
smartRollupAddressDecoder used to throw InvalidAddressError now throw InvalidSmartRollupAddressError@taquito/local-forging
used to have class InvalidSmartRollupContractAddressError now is InvalidSmartRollupCommitmentHashError@taquito/local-forging
function smartRollupContractAddressEncoder rename to smartRollupCommitmentHashEncoder@taquito/signer
PrivateKeyError is replaced by common error InvalidKeyError from@taquito/core
-
In
@taquito/michelson-encoder
we introduced a new semantic{ Some: null}
to EncodeObject() for nested options type like (option (option nat)). The old semantic still works when making contract calls but will look to deprecated them in the future as table below. And the correspondingExecute()
will now return new semantic{ Some: 1 }
as previously return1
will be deprecated soon. #2344
Note: There are also significant (backwards compatible) changes to the @taquito/taquito
package, largely regarding the flow of preparing, estimating, forging, and injecting operations into a node. No breaking changes are expected, but users are welcomed to reach out to the team if any issues arise.
Summary
New Features
- Introduction of the new
@taquito/core
package, which will contain important types and shared classes #1992
Bug Fixes
- Fixed contract calls with nested
option
withSome None
#2344 - Fixed a broken
isNode
check that checks whether the runtime environment is a Node environment or not PR#2498
Improvement
@taquito/taquito
- Tweaked the functionality ofPrepareProvider
to not have coupling with Estimation, it will now outputPreparedOperation
with default fees, gas limits and, storage limits #2257@taquito/taquito
- Added a filter for events listener to exclude failed events #2319@taquito/utils
- Updated address validation to include smart rollup addresses #2444- Removed duplicate error classes and did a small audit to streamline them across all packages #1993
- Improved error messages and fix relevant error classes in
@taquito/local-forging
and@taquito/signer
#1994
Documentation
- Updated old Michelson code in our smart contract documentation #2482
- Updated
README
to reference Mumbainet #2459 - Updated wrong example in docs for Tezos domains #2436
- Added extra detail on complex parameter calls in the docs #2443
Internals
OperationEmitter
class in@taquito/taquito
have been replaced withPrepareProvider
and theProvider
abstract class #2257- Removed the dependency
axios-fetch-adapter
and adapted the code directly into Taquito PR#2457
@taquito/taquito
- Added a filter for events listener to exclude failed events
Introduces a new filter excludeFailedOperations
to determine whether you'd want to filter out failed events or not
const Tezos = new TezosToolkit(RPC_URL);
Tezos.setStreamProvider(
Tezos.getFactory(PollingSubscribeProvider)({
shouldObservableSubscriptionRetry: true,
pollingIntervalMilliseconds: 1500
})
);
try {
const sub = Tezos.stream.subscribeEvent({
tag: 'tagName',
address: 'KT1_CONTRACT_ADDRESS',
excludeFailedOperations: true
});
sub.on('data', console.log);
} catch (e) {
console.log(e);
}
@taquito/taquito
- Tweaked the functionality of PrepareProvider
The PrepareProvider
is a somewhat new feature to Taquito that allows users to independently create a PreparedOperation
object. It's behaviour is slightly changed so that it does not estimate directly when preparing. The estimation and the preparation process are now 2 separate process, removing the circular dependency it used to have.