Repository navigation
how to put a transaction ? #14
Answered
by
nguyenphuminh
sasdecompte
asked this question in
Q&A
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 |
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
sendTransactionfunction.Example:
Replace
amountwith the amount of money you want to send, replacegaswith the amount of gas you want to use, 1 is minimum.Paste the code in
jenode.jsif 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
…