Skip to content

jcbombardelli/vuex-web3

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Welcome to vuex-web3 👋

Version Twitter: jcbombardelli

This web3 to a vuex state

Prereqs

If you are running Windows OS and have never worked with Dapps, be sure to follow this tutorial first. https://medium.com/@jcbombardelli/configurando-web3-em-um-projeto-node-js-com-windows-984ca1224fa (pt-BR text)

Install

npm install vuex-web3 --save

Usage

import store from './vuex/store'
import registerWeb3 from 'vuex-web3'

registerWeb3(store, 'w3') 
// second parameter is module name is optional

Exposed Getters:

address - need description
coinbase - String ETH Address Hex
instance - Function<Web3> Function that returns web3 instance
isInjected - Boolean True if web3 is injected
network - String Network
isLocal - Boolean True if web3 instance is connected to local node
balance - String Wallet balance
contract - same as web3.eth.contract
isConnected - same as web3.isConnected

Run tests

npm run test

Publish Package

npm run build
npm package

Author

👤 JC Bombardelli

🤝 Contributing

Contributions, issues and feature requests are welcome!
Feel free to check issues page.

Show your support

Give a ⭐️ if this project helped you!


This Project was created with ❤️ by JC Bombardelli and powered by readme-md-generator

Releases

No releases published

Sponsor this project

Packages

No packages published