Skip to content

doITmagic/blockchain

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

exemples for using go-ethereum

Ethereum Development with Golang

Local setup

install Ganache testing purposes while developing dapps locally

  • install it
npm install -g ganache-cli
  • run ganache client, use the same mnemonic when starting ganache to generate the same sequence of public addresses:
ganache-cli -m "ticket version capable vocal country artwork industry hat senior breeze leg great cherry abuse inch round essence random laptop organ mesh resemble trade panic" 
  • if ganache return error digital envelope routines::unsupported the run:
export NODE_OPTIONS=--openssl-legacy-provider

!!! You must start Ganache before running example !!!

Each dir host an example:

Client connection implementation:

cd client
go run client.go

Account balance implementation, example for:

  • balance of an account
  • account balance at the time of that block
  • pending account balance
  • generate new wallet
  • generate hdwallet
  • utility to generate mnemonic words
  • validate address, check address type (contract or account)
cd account
go run account.go 

About

Ethereum Development with Golang

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages