-
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
Analyze serialization of variadic arguments (v12 vs v13) #441
Conversation
Dealing with
|
Dealing with
|
@@ -1,14 +1,67 @@ | |||
/* eslint-disable @typescript-eslint/no-namespace */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No change in logic within the file. Only formatting.
Follow-up of #435.
In v13, some client code that deals with Smart Contract calls might be affected by an unforeseen breaking (but minor) change.
Circumstances (affected code):
SmartContract.call()
to prepare transactionsabi
to theSmartContract
(when creating an instance)Solutions:
abi
parameter when creating theSmartContract
objectCode that isn't affected:
SmartContract.methods.myFunction()
to prepare a contract callSmartContract.methodsExplicit.myFunction()
to prepare a contract callUnder-the-hood differences:
SmartContract.call()
only acceptedTypedValue
objects asargs
.SmartContract.call()
accepts a mixture ofTypedValue
objects and native JavaScript values / objects asargs
. This makes use of theNativeSerializer
component, under the hood. This causes the unforeseen breaking (but minor) change.Additional notes:
In
sdk-core v13
, the recommended way to create transactions for deploying, upgrading and interacting with smart contracts is through aSmartContractTransactionsFactory
. The older (legacy) approaches are still available, however.