Life Cycle of a XinFin XDC Network Transaction

  1. An end-to-end traversal of a XinFin transaction starting from your browser/console to the XinFin XDC Network and back to your browser/console
  2. Understand how transactions work when you use a plugin such as XDCPay or XinFin Web Wallet instead of running your own node
  3. What to do if you are too paranoid and don’t trust any plugins to execute your transaction?
Voting.deployed().then(function(instance) {
instance.voteForCandidate(‘Ruslan’, {gas: 140000, from: web3.eth.accounts[0]}).then(function(r) {
console.log(“Voted successfully!”)
})
})
txnCount = xdc3.eth.getTransactionCount(xdc3.eth.accounts[0])
var rawTxn = {
nonce: xdc3.toHex(txnCount),
gasPrice: xdc3.toHex(100000000000),
gasLimit: xdc3.toHex(140000),
to: ‘xdc633296baebc20f33ac2e1c1b105d7cd1f6a0718b’,
value: xdc3.toHex(0),
data: ‘0xcc9ab24952616d6100000000000000000000000000000000000000000000000000000000’
};
const privateKey = Buffer.from(‘e331b6d69882b4ab4ea581s88e0b6s4039a3de5967d88dfdcffdd2270c0fd109’, ‘hex’)const txn = new EthereumTx(rawTxn)
txn.sign(privateKey)
const serializedTxn = txn.serialize()
transactionId = sha3(serializedTxn)

--

--

--

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Cens World— Public IDO Timeline & Contribution Guide

Deep Dive into the Decentralized Binary Options of Thales Dapp

Top Blockchain Events to attend for June 2022

Top Blockchain Events to attend for June 2022

Where should we go in the field of cryptocurrency?

RiteStream x Alpha Hunt

BLOCKCHAIN-SIDECHAIN TRANSACTIONS WITH “TWIN ACCOUNTS”

KCN: Haitian farms use blockchain

The Two Houseman Encounter

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
ruslan wing

ruslan wing

More from Medium

What are XRC-721 and XRC-1155: Standards for Creating NFTs on XinFin Network

Bi-Weekly Update Prime Numbers

Flux partners with THRESH0LD.

Multi-phase Token Burn — 20% of Total Supply