how to put a transaction ? #14
Answered
by
nguyenphuminh
sasdecompte
asked this question in
Q&A
-
Beta Was this translation helpful? Give feedback.
Answered by
nguyenphuminh
Mar 13, 2022
Replies: 1 comment
-
As said in the README, you can send a transaction by using the Example: // Create a new transaction object
const transaction = new Transaction(publicKey, "the address you are sending to", amount, gas);
// sign the transaction
transaction.sign(keyPair);
// broadcast transaction
sendTransaction(transaction); Replace Paste the code in Advanced To deploy a contract, replace the recipient's address with To add additional arguments when you are calling a contract, add an argument to |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
nguyenphuminh
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
As said in the README, you can send a transaction by using the
sendTransaction
function.Example:
Replace
amount
with the amount of money you want to send, replacegas
with the amount of gas you want to use, 1 is minimum.Paste the code in
jenode.js
if you haven't known about this.Advanced
To deploy a contract, replace the recipient's address with
"SC" + code of your contract
.To add additional arguments when you are calling a contract, add an argument to
…