This repository has been archived by the owner on Oct 4, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 14
web.js 0.9
Mr. Is edited this page Jun 11, 2017
·
5 revisions
Web3.js 0.9 changes
I would like to apply KISS principle to web3.js. I used the library recently much more and I realised that we are doing to many things implicitly. eg:
1, newFilter it should either get all logs or poll for new logs. It's shouldn't do both in the same time. In my story, I don't want to poll for filter changes, but I want to get all logs between block X and Y. Same as caktux here: https://github.com/ethereumproject/web3.js/issues/250
examples of new solution
1st.
var x = web3.eth.filter(...); // sync: eth_newFilter
x.watch(function (err, log) { // async poll: eth_getFilterChanges
})
2nd.
web3.eth.filter(..., function (err, x) { // async: eth_newFilter
x.watch(function (err, log) { // async poll: eth_getFilterChanges
})
})
3rd.
var x = web3.eth.filter(...) // sync: eth_newFilter
var logs = x.logs(); // sync: eth_getFilterLogs
4th.
var x = web3.eth.filter(...) // sync: eth_newFilter
var logs = x.logs(function (err, logs) { // sync: eth_getFilterLogs
}
- Ðapp Developer Resources
- JavaScript API
- JSON RPC API
- Solidity
- Solidity Features
- Useful Ðapp Patterns
- Standardized Contract APIs
- Ðapp using Meteor
- Ethereum development tutorial
- Mix Tutorial
- Mix Features
- Serpent
- LLL
- Mutan
- Morden Testnet
- Chain Spec Format
- Inter-exchange Client Address Protocol
- URL Hint Protocol
- NatSpec Determination
- Network Status
- Raspberry Pi
- Exchange Integration
- Mining
- Licensing
- Consortium Chain Development
- RLP Encoding
- RLPx Node Discovery Protocol
- ÐΞVp2p Wire Protocol
- ÐΞVp2p Whitepaper (WiP)
- Web3 Secret Storage
- Patricia Tree
- Wire protocol
- Light client protocol
- Subtleties
- Solidity, Docs & ABI
- NatSpec Format
- Contract ABI
- Bad Block Reporting
- Bad Chain Canary
- Extra Data
- Brain Wallet