-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sdk-core v12 #263
Merged
Merged
sdk-core v12 #263
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
… version of sortCustomTypesByDependencies
Fix sort custom types abi
fix: Update type of abiRegistry types
Merge main in feat erdjs v12
Guarded transaction
andreibancioiu
previously approved these changes
Apr 5, 2023
Prepare release of v12
andreibancioiu
previously approved these changes
Apr 5, 2023
bogdan-rosianu
previously approved these changes
Apr 5, 2023
Adjust interface of transaction
andreibancioiu
dismissed stale reviews from bogdan-rosianu and themself
via
April 6, 2023 13:57
9ecfabe
andreibancioiu
previously approved these changes
Apr 6, 2023
bogdan-rosianu
previously approved these changes
Apr 6, 2023
…ed). Kept AbiRegistry, which is sufficient. Breaking change.
Breaking change / simplification: remove "SmartContractAbi"; "AbiRegistry" is sufficient
andreibancioiu
dismissed stale reviews from bogdan-rosianu and themself
via
April 7, 2023 08:32
516cf36
andreibancioiu
approved these changes
Apr 7, 2023
bogdan-rosianu
approved these changes
Apr 7, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
sdk-core v12
is now released 🎉See the updated cookbook. Also, see the migration notes.
We've added support for guarded transactions: see the new fields
transaction.guardian
,transaction.guardianSignature
and the functiontransaction.applyGuardianSignature()
.Creating a guarded transaction looks as follows:
Passing the
sender
is now required on most transaction builders (not only on theTransaction
constructor). For example, you are required to pass thecaller
when usingsmartContract.call()
or thedeployer
when usingsmartContract.deploy()
. When using the interactions API, make sure to callinteraction.withSender()
.transaction.setSender()
is also supported (if needed).For developers of wallet / wallet-like applications:
sdk-core v12
supports bothsdk-wallet v3
andsdk-wallet v4
. Though, we recommend migrating tosdk-wallet v4
. Then, signing transactions would look as follows:We've slightly simplified the loading of an ABI and feeding it to a
SmartContract
object. See #281. In v12, this is done as follows:Breaking changes
transaction.getSignature()
now returns aBuffer
, instead of aISignature
object.TransfersFactory
has been renamed toTransferTransactionsFactory
tokenPayment.toRationalNumber()
has been renamed totoAmount()
- and, actually, it became private, you cannot use (should not use) it anymore.toPrettyString()
is still available, but it may be deprecated in a future release, in favor of a separate, more customizable formatter.TransactionOptions.withTxHashSignOptions
. Use the constructor instead, and pass it the necessary flags (options).TransactionWatcher
.TRANSACTION_VERSION_TX_HASH_SIGN
has been renamed toTRANSACTION_VERSION_WITH_OPTIONS
.SmartContractAbi
andContractInterface
- they were over-engineered, designed to handle multiple sets of contract endpoints (namespaces / separate interfaces etc.). We've keptAbiRegistry
, which is sufficient.abiRegistry.getAllEndpoints
has been renamed togetEndpoints()
.SmartContract.setAbi()
has been removed. The ABI is passed in constructor only.SmartContract.getAbi()
is not exposed anymore. When an ABI definition is needed (e.g. endpoint, type), it should be found in theAbiRegistry
.ContractFunction.equals()
- was already deprecated for some time.Deprecations
TokenPayment
has been deprecated (renamed). Use the new name:TokenTransfer
, instead.ITokenPayment
becameITokenTransfer
, as well. The old names will be removed in the next major version.sender
ofinteraction.withSingleESDTNFTTransfer()
andinteraction.withMultiESDTNFTTransfer()
. Useinteraction.withSender()
instead.transaction.options
,transaction.version
is now deprecated. Use theget*
andset*
functions, instead.Pull Requests
New Contributors