All Projects → regcostajr → Go Web3

regcostajr / Go Web3

Licence: gpl-3.0
Ethereum Go Client [obsolete]

Programming Languages

go
31211 projects - #10 most used programming language
golang
3204 projects

Projects that are alternatives of or similar to Go Web3

Blockchainbooks.github.io
Blockchain Books
Stars: ✭ 139 (+15.83%)
Mutual labels:  blockchain, ethereum, web3
Eth Crypto
Cryptographic javascript-functions for ethereum and tutorials to use them with web3js and solidity
Stars: ✭ 420 (+250%)
Mutual labels:  blockchain, ethereum, web3
Eth Vue
Featured in Awesome Vue [https://github.com/vuejs/awesome-vue], a curated list maintained by vuejs of awesome things related to the Vue.js framework, and Awesome List [https://awesomelists.net/150-Vue.js/3863-Open+Source/18749-DOkwufulueze-eth-vue], this Truffle Box provides everything you need to quickly build Ethereum dApps that have authentication features with vue, including configuration for easy deployment to the Ropsten Network. It's also Gravatar-enabled. Connecting to a running Ganache blockchain network from Truffle is also possible -- for fast development and testing purposes. Built on Truffle 5 and Vue 3, eth-vue uses vuex for state management, vuex-persist for local storage of app state, and vue-router for routing. Authentication functionalities are handled by Smart Contracts running on the Ethereum blockchain.
Stars: ✭ 171 (+42.5%)
Mutual labels:  blockchain, ethereum, web3
Ethvtx
🌀🛰 ethereum-ready & framework-agnostic redux store configuration
Stars: ✭ 125 (+4.17%)
Mutual labels:  blockchain, ethereum, web3
Web Sdk
Portis Web SDK
Stars: ✭ 65 (-45.83%)
Mutual labels:  blockchain, ethereum, web3
React Ethereum Dapp Example
A starter boilerplate for an Ethereum dapp using web3.js v1.0, truffle, react, and parity
Stars: ✭ 384 (+220%)
Mutual labels:  blockchain, ethereum, web3
Cyb Archeology
🌎 Personal immortal robot for the The Great Web
Stars: ✭ 117 (-2.5%)
Mutual labels:  blockchain, ethereum, web3
Eattheblocks
Source code for Eat The Blocks, a screencast for Ethereum Dapp Developers
Stars: ✭ 431 (+259.17%)
Mutual labels:  blockchain, ethereum, web3
Trace
Supply chain transparency platform proof-of-concept based on the Ethereum blockchain ✍️
Stars: ✭ 52 (-56.67%)
Mutual labels:  blockchain, ethereum, web3
Typechain
🔌 TypeScript bindings for Ethereum smart contracts
Stars: ✭ 769 (+540.83%)
Mutual labels:  blockchain, ethereum, web3
Trust Wallet Ios
📱 Trust - Ethereum Wallet and Web3 DApp Browser for iOS
Stars: ✭ 1,228 (+923.33%)
Mutual labels:  blockchain, ethereum, web3
Marketprotocol
Ethereum based derivatives trading protocol creating digital tokens for any asset
Stars: ✭ 78 (-35%)
Mutual labels:  blockchain, ethereum, web3
Dapp
Censorship resistant democracies.
Stars: ✭ 1,326 (+1005%)
Mutual labels:  blockchain, ethereum, web3
Backend Ico Dashboard
Free & open-source dashboard for your next ICO, crowdsale or tokensale
Stars: ✭ 110 (-8.33%)
Mutual labels:  blockchain, ethereum
Truffle Assertions
🛠 Assertions and utilities for testing Ethereum smart contracts with Truffle unit tests
Stars: ✭ 109 (-9.17%)
Mutual labels:  ethereum, web3
Mosaic Contracts
Mosaic-0: Gateways and anchors on top of Ethereum to scale DApps
Stars: ✭ 119 (-0.83%)
Mutual labels:  blockchain, ethereum
Blockapi
A general framework for blockchain analytics
Stars: ✭ 111 (-7.5%)
Mutual labels:  blockchain, ethereum
Ergo
The Language for Smart Legal Contracts
Stars: ✭ 108 (-10%)
Mutual labels:  blockchain, ethereum
Vscode Azure Blockchain Ethereum
Blockchain extension for VS Code
Stars: ✭ 111 (-7.5%)
Mutual labels:  blockchain, ethereum
Hydro Scaffold Dex
A Decentralized Exchange Scaffold - launch a DEX in minutes
Stars: ✭ 112 (-6.67%)
Mutual labels:  blockchain, ethereum

DEPRECATED

No Maintenance Intended

This project is no longer supported, please consider using go-ethereum instead.

go-ethereum has all the features of this project(and more) and it's development is much more robust.

Ethereum Go Client

Build Status

This is a Ethereum compatible Go Client

Status

DEPRECATED

This package is not currently under active development. It is not already stable and the infrastructure is not complete and there are still several RPCs left to implement.

Usage

Deploying a contract


bytecode := ... #contract bytecode
abi := ... #contract abi

var connection = web3.NewWeb3(providers.NewHTTPProvider("127.0.0.1:8545", 10, false))
contract, err := connection.Eth.NewContract(abi)

transaction := new(dto.TransactionParameters)
coinbase, err := connection.Eth.GetCoinbase()
transaction.From = coinbase
transaction.Gas = big.NewInt(4000000)

hash, err := contract.Deploy(transaction, bytecode, nil)

fmt.Println(hash)
	

Using contract public functions


result, err = contract.Call(transaction, "balanceOf", coinbase)
if result != nil && err == nil {
	balance, _ := result.ToComplexIntResponse()
	fmt.Println(balance.ToBigInt())
}
	

Using contract payable functions


hash, err = contract.Send(transaction, "approve", coinbase, 10)
	

Using RPC commands

GetBalance


balance, err := connection.Eth.GetBalance(coinbase, block.LATEST)

SendTransaction


transaction := new(dto.TransactionParameters)
transaction.From = coinbase
transaction.To = coinbase
transaction.Value = big.NewInt(10)
transaction.Gas = big.NewInt(40000)
transaction.Data = types.ComplexString("p2p transaction")

txID, err := connection.Eth.SendTransaction(transaction)

Contribute!

Before a Pull Request:

  • Create at least one test for your implementation.
  • Don't change the import path to your github username.
  • run go fmt for all your changes.
  • run go test -v ./...

After a Pull Request:

  • Please use the travis log if an error occurs.

In Progress =

Partially implemented =

TODO List

  • [x] web3_clientVersion
  • [x] web3_sha3
  • [x] net_version
  • [x] net_peerCount
  • [x] net_listening
  • [x] eth_protocolVersion
  • [x] eth_syncing
  • [x] eth_coinbase
  • [x] eth_mining
  • [x] eth_hashrate
  • [x] eth_gasPrice
  • [x] eth_accounts
  • [x] eth_blockNumber
  • [x] eth_getBalance
  • [x] eth_getStorageAt (deprecated)
  • [x] eth_getTransactionCount
  • [x] eth_getBlockTransactionCountByHash
  • [x] eth_getBlockTransactionCountByNumber
  • [x] eth_getUncleCountByBlockHash
  • [x] eth_getUncleCountByBlockNumber
  • [x] eth_getCode
  • [x] eth_sign
  • [x] eth_sendTransaction
  • [ ] eth_sendRawTransaction
  • [x] eth_call
  • [x] eth_estimateGas
  • [x] eth_getBlockByHash
  • [x] eth_getBlockByNumber
  • [x] eth_getTransactionByHash
  • [x] eth_getTransactionByBlockHashAndIndex
  • [x] eth_getTransactionByBlockNumberAndIndex
  • [x] eth_getTransactionReceipt
  • [ ] eth_getUncleByBlockHashAndIndex
  • [ ] eth_getUncleByBlockNumberAndIndex
  • [ ] eth_getCompilers
  • [ ] eth_compileLLL
  • [x] eth_compileSolidity (deprecated)
  • [ ] eth_compileSerpent
  • [ ] eth_newFilter
  • [ ] eth_newBlockFilter
  • [ ] eth_newPendingTransactionFilter
  • [ ] eth_uninstallFilter
  • [ ] eth_getFilterChanges
  • [ ] eth_getFilterLogs
  • [ ] eth_getLogs
  • [ ] eth_getWork
  • [ ] eth_submitWork
  • [ ] eth_submitHashrate
  • [ ] db_putString
  • [ ] db_getString
  • [ ] db_putHex
  • [ ] db_getHex
  • [ ] shh_post
  • [ ] shh_version
  • [ ] shh_newIdentity
  • [ ] shh_hasIdentity
  • [ ] shh_newGroup
  • [ ] shh_addToGroup
  • [ ] shh_newFilter
  • [ ] shh_uninstallFilter
  • [ ] shh_getFilterChanges
  • [ ] shh_getMessages
  • [x] personal_listAccounts
  • [x] personal_newAccount
  • [x] personal_sendTransaction
  • [x] personal_unlockAccount

Installation

go get

go get -u github.com/regcostajr/go-web3

glide

glide get github.com/regcostajr/go-web3

Requirements

  • go ^1.8.3
  • golang.org/x/net

Testing

Node running in dev mode:

geth --dev --shh --ws --wsorigins="*" --rpc --rpcapi admin,db,eth,debug,miner,net,shh,txpool,personal,web3 --mine

Full test:

go test -v ./test/...

Individual test:

go test -v test/modulename/filename.go

License

Package go-web3 is licensed under the GPLv3 License.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].