Skip to content

rvmzes/DigitalDiploma

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DigitalDiploma

Bachelor's project using Ethereum blockchain and smart contracts

Open terminal and run the following:

node
Then:

Web3 = require('web3')
web3 = new Web3(new Web3.providers.HttpProvider("http://localhost:8545"));
code = fs.readFileSync('DigitalDiploma.sol').toString()
solc = require('solc')
compiledCode = solc.compile(code)
abiDefinition = JSON.parse(compiledCode.contracts[':DigitalDiploma'].interface)
ddContract = web3.eth.contract(abiDefinition)
byteCode = compiledCode.contracts[':DigitalDiploma'].bytecode
deployedContract = ddContract.new({data: byteCode, from: web3.eth.accounts[0], gas: 4700000})
cInstance = ddContract.at(deployedContract.address)

About

Bachelor's project using Ethereum blockchain and smart contracts

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published