-
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
Tool 373 mark as deprecated all legacy functions #567
Tool 373 mark as deprecated all legacy functions #567
Conversation
src/abi/interaction.ts
Outdated
@@ -21,7 +21,7 @@ interface ISmartContractWithinInteraction { | |||
} | |||
|
|||
/** | |||
* Legacy component. Use "SmartContractTransactionsFactory" (for transactions) or "SmartContractQueriesController" (for queries), instead. | |||
* @deprecated component. Use "SmartContractTransactionsFactory" (for transactions) or "SmartContractQueriesController" (for queries), instead. |
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.
this does not exist anymore: SmartContractQueriesController
. Change to:
Use "SmartContractTransactionsFactory" or "SmartContractController", instead.
or something similar.
transaction.setSender(alice.address); | ||
transaction.applySignature(await alice.signer.sign(transaction.serializeForSigning())); | ||
transaction.sender = alice.address; | ||
transaction.signature = await alice.signer.sign(transactionComputer.computeBytesForSigning(transaction)); |
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.
In a future PR, since now we have the Account
class, maybe replace alice.signer.sign(...)
withalice.signTransaction(...)
?
assert.equal(deployTransaction.gasLimit, 1000000n); | ||
assert.equal(deployTransaction.nonce, 42n); | ||
|
||
// Sign the transaction | ||
deployTransaction.applySignature(await alice.signer.sign(deployTransaction.serializeForSigning())); | ||
deployTransaction.signature = await alice.signer.sign(computer.computeBytesForSigning(deployTransaction)); |
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.
Same comment / signTransaction
etc.
@@ -13,7 +13,7 @@ import { TransferTransactionsFactory } from "./transfers/transferTransactionsFac | |||
|
|||
describe("test transaction", function () { | |||
let alice: TestWallet, bob: TestWallet; | |||
|
|||
const transactionComputer = new TransactionComputer(); |
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.
Missing empty line below (here, and in a few other files that have been changed).
src/transaction.local.net.spec.ts
Outdated
transactionOne.nonce = alice.account.nonce; | ||
alice.account.incrementNonce(); | ||
transactionTwo.setNonce(alice.account.nonce); | ||
transactionTwo.nonce = alice.account.nonce; |
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.
Maybe we can even use getThenIncrementNonce()
- this is the place it excels?
src/abi/interaction.ts
Outdated
@@ -21,7 +21,7 @@ interface ISmartContractWithinInteraction { | |||
} | |||
|
|||
/** | |||
* @deprecated component. Use "SmartContractTransactionsFactory" (for transactions) or "SmartContractQueriesController" (for queries), instead. | |||
* @deprecated component. Use "SmartContractTransactionsFactory" (for transactions) or "SmartContractController" (for queries), instead. |
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.
the controller can be used for transactions, as well.
@@ -11,7 +11,7 @@ import { ProxyNetworkProvider } from "./proxyNetworkProvider"; | |||
|
|||
describe("ProxyNetworkProvider Tests", function () { | |||
const proxy = new ProxyNetworkProvider("https://devnet-gateway.multiversx.com"); | |||
|
|||
const transactionComputer = new TransactionComputer(); | |||
it("should fetch network configuration", async () => { |
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.
add empty line here
No description provided.